- or download this
#!/usr/bin/perl -wT
user strict;
- or download this
while (<>) {
$array[$index++] = $_ if /$searchstring/;
}
- or download this
while (<>) {
push (@array, $_) if /$searchstring/;
}
- or download this
if (/$searchstring/) { &doSomething }
&doSomething if /$searchstring/;