Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: WHILE and DEFINED problem

by demerphq (Chancellor)
on Mar 06, 2004 at 20:50 UTC ( [id://334532]=note: print w/replies, xml ) Need Help??


in reply to Re: WHILE and DEFINED problem
in thread WHILE and DEFINED problem

Well, actually this all wrong. chomp certainly doesnt belong on the right side of a =~ operator. The way to write this is to use the idiom that dragonchild outlined:

while (<$in>) { chomp(my $line=$_); next unless length $line; print; } __END__ # please excuse this stuff here, just doing some pmdev testing with th +is node :-) # it will be removed soon. # No indent # single space # two spaces # three spaces # four spaces # No indent # single space # two spaces # three spaces # four spaces

:-)


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi


Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://334532]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 02:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found