So i\'m writing a quick perl script that cleans up some HTML code and runs it through a html -> pdf program. I want to lose as little information as possible, so I\'d like t
The (?{...})
pattern is an experimental feature for executing code on the match side, but you want to execute code on the replacement side. Use the /e
regular-expression switch for that:
#! /usr/bin/perl
use warnings;
use strict;
use POSIX qw/ ceil /;
while () {
s[] {
my $rows = ceil(length($3) / 80);
qq[];
}egis;
print;
}
__DATA__
Output: