in reply to Re^2: key value pair or simply a regexp
in thread key value pair or simply a regexp
#!/usr/bin/perl use strict; use warnings; my $out = qq(/home/smith/out); open (my $file, "+<", $out) or die $!; local $/ = ','; while (<$file>) { s/^\s+|\s+$//g; my ($msgagt) = $_ =~ /\w+=([^,]+)/; print $msgagt, "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: key value pair or simply a regexp
by jdporter (Paladin) on May 21, 2007 at 14:59 UTC |