in reply to Matching Stuff with Regex
or you can try:while ($line = <INPUT>) { # or where ever you get your input from @temp = split()/,+/, $line); if ($temp[0] eq '--' && $temp[3] eq '--' && $temp[4] eq '--' && $temp[5] eq '--') { # then do whatever you want } }
while ($line = <INPUT>) { /([e\d+.]+),[the same],[the same],([the same]),([the same]),([the sa +me])/; if ($1 eq '--' || $2 eq '--' || $3 eq '--' && $4 eq '--') { # do your ting } }
|
|---|