Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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'

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 wandering the Monastery: (4)
As of 2016-08-30 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (411 votes). Check out past polls.