Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: perl one liner print columns 2.. last

by LanX (Chancellor)
on Jan 04, 2013 at 19:24 UTC ( #1011707=note: print w/replies, xml ) Need Help??


in reply to Re: perl one liner print columns 2.. last
in thread perl one liner print columns 2.. last

Sorry thats wrong, your test data is misleading you :)

you are calculating the numerical range between 2 and 6, which by accident was your input.

now change the input in between:

> echo - 2 - - - 6|perl -lane 'print $F[1]..$F[-1]' 23456

but a slice works: =)

> echo - 2 - - - 6|perl -lane 'print @F[1..$#F]' 2---6

Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1011707]
help
Chatterbox?
[marto]: Sharepoint ss a mess
[marto]: /ss/is/
[Discipulus]: yes I can imagine marto but they dont take my opinion in consideration..
[marto]: I told our client this, they spent many years and lots of consultants to try and get it to do what they wanted. They're ditching it now
[Discipulus]: I hope at least a minimal implementation, in the middle of july i'll have the first introductional course..
Discipulus nemo profeta in patria..

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2017-06-27 09:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (601 votes). Check out past polls.