local undef $/; open(FILE,"<printfile"); my $_ = <FILE>; # slurp close (FILE); print "printer '$1' $2 - $3\n" while (/^printer\s+(\w+)\s+\w+\s+(\w+)\ +.\s+(\w+)/msg); __OUTPUT__ 'llp' idle - enabled 'ps' idle - enabled
Dingus
In reply to Re: Matching for the second,fourth, and fifth word in a text
by dingus
in thread Matching for the second,fourth, and fifth word in a text
by kirk123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |