Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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
Replies are listed 'Best First'.
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 scrutinizing the Monastery: (17)
As of 2015-07-28 19:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls