Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Re: Re: hm strange loop for me..

by pjf (Curate)
on Jan 24, 2002 at 11:01 UTC ( #141167=note: print w/replies, xml ) Need Help??

in reply to Re: Re: hm strange loop for me..
in thread hm strange loop for me..

It's easy enough to check for a blank record:

$/ = "\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.


Paul Fenwick
Perl Training Australia

Replies are listed 'Best First'.
Re: Re: Re: Re: hm strange loop for me..
by agustina_s (Sexton) on Jan 24, 2002 at 12:21 UTC
    Thanks... it works..

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://141167]
[marto]: not on the Sun, it'd vaporise
[Corion]: marto: No, a Sun Balcony, it was an ill-fated attempt to revive the Sparc series after the Pizzabox :)
[marto]: ah Sun, I sold my Pizzabox in around 2005
[Corion]: I used one at $work as a terminal, but those days are long gone by ;)
[marto]: I have an old IBM infowindow terminal to repurpose, I'll just wire a raspberry piz zero to the cable, providing access and wiFi :P
[marto]: the kids will love it

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2018-03-21 11:18 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (267 votes). Check out past polls.