Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Howto print multiple matches in a line

by blazar (Canon)
on Nov 11, 2008 at 12:09 UTC ( #722832=note: print w/replies, xml ) Need Help??


in reply to Howto print multiple matches in a line

$fn=<>; open(FH, "$fn") || die("Can't open:$!");

I personally believe that, incidentally, you will be very likely to die since that will try to open a file whose name ends with a carriage return, and in turn that may well exist on your system (especially if it's some breed of *NIX) but... it's unprobable. Also, "$fn" is called "useless use of quoting variables." Last, didn't mom tell you to always run under strict, except maybe for the simplest one liners?

--
If you can't understand the incipit, then please check the IPB Campaign.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://722832]
help
Chatterbox?
[karlgoethebier]: I'll take that right hand road...
[thezip]: Howdy y'all. Is it safe to just delete StrawberryPerl-> cpan->build directories?
[1nickt]: karlgoethebier Thank you!! How could I not have ever heard of this musician?
[choroba]: thezip should be ok.
[thezip]: It seemed so, choroba, but I don't want to confuse anyone (especially myself!)
[choroba]: thezip unless something like this happens to you.

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2017-03-23 20:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (294 votes). Check out past polls.