Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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


Comment on Re^2: perlish way of splitting file records
Select or Download Code

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 musing on the Monastery: (5)
As of 2014-08-30 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls