sub getchar
{
- $pushback = <> if (length($pushback) == 0);
+ $pushback = <STDIN> if (length($pushback) == 0);
$char = substr($pushback, 0, 1);
$pushback = substr($pushback,1);
return $char;
sub sizefix
# Apply attrfix to the attributes in each image tag
{
- while (<>) {
+ while (<STDIN>) {
while (/<IMG\s+/i) {
print $`; print $&;
flush;
$attribs = $_[0];
if (!($attribs =~ /SRC="([^"]*)"/i)) {
- &error("image '${attribs}' has no SRC attribute");
+ &error("image \"${attribs}\"' has no SRC attribute");
return $attribs;
}
$url = $1;