$/ = "\n//\n"; # Or whatever is appropriate. while (<>) { chomp; # Removes the field separator. next if /^\s*$/; # Skip "space-only" records. # Do stuff here. }
This means if there's a blank record at the end (or in the middle, for that matter) it will get skipped instead of processed.
Cheers,
Paul Fenwick
Perl Training Australia
In reply to Re: Re: Re: hm strange loop for me..
by pjf
in thread hm strange loop for me..
by agustina_s
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |