Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^5: one-line split file sequence checker

by jwkrahn (Monsignor)
on Jan 23, 2008 at 00:07 UTC ( #663719=note: print w/ replies, xml ) Need Help??


in reply to Re^4: one-line split file sequence checker
in thread one-line split file sequence checker

You can golf that a bit more:

perl -le '@x[@f]=@f=map/(\d+)$/,<*[0-9]>;$x[$_]||print for+1..$#x'


Comment on Re^5: one-line split file sequence checker
Download Code
Re^6: one-line split file sequence checker
by wdef2 (Acolyte) on Jan 23, 2008 at 13:46 UTC
    That @x[@f]=@f had me puzzled for a while, but it seems it is the same as:

    @x[(@f)]=(@f)

    So just @f is always expanded into a list without (), and () is not necessary when defining an array from a list?

    I'm still looking at the next one.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-08-28 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (256 votes), past polls