Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: perlish way of splitting file records

by VSarkiss (Monsignor)
on Jun 01, 2006 at 16:39 UTC( #553088=note: print w/replies, xml ) Need Help??


in reply to Re: perlish way of splitting file records
in thread perlish way of splitting file records

The parenthesis following print is assumed to contain its arguments. You can either enclose everything in parens as you've done, or disambiguate in some other way, such as with unary plus. Consider:

$ perl -MO=Deparse -e 'print ((split /:/,<FILEHANDLE>)[3])' print((split(/:/, <FILEHANDLE>, 0))[3]); -e syntax OK $ perl -MO=Deparse -e 'print +(split /:/,<FILEHANDLE>)[3]' print((split(/:/, <FILEHANDLE>, 0))[3]); -e syntax OK

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2016-08-30 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (410 votes). Check out past polls.