- or download this
>perl -wMstrict -le
"my $s = '1a2b3c';
...
matched '3c'
matched '3c'
matched '3c'
- or download this
$pattern = 'Seuss';
while (<>) {
print if /$pattern/;
}
- or download this
#!/usr/bin/perl
# Improved simple_grep
...
while (<>) {
print if /$regexp/o; # a good deal faster
}