Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Editing just one column in a file

by ZWcarp (Beadle)
on Nov 28, 2011 at 22:14 UTC ( #940486=note: print w/ replies, xml ) Need Help??


in reply to Re: Editing just one column in a file
in thread Editing just one column in a file

Ahhh ok brilliant. One more question.. why does this only print one column instead of the specified array range?I'm sure I'm doing something stupid but I can't find a good website or text with detailed stuff on specific command line perl

perl -lane '$,="\t";print $F[0..6]'  file.txt Thanks so much!

UPDATE Sorry, I got it, you just need to change the $ to a @ in front of F. Apologies


Comment on Re^2: Editing just one column in a file
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://940486]
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: (11)
As of 2015-07-06 16:18 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 (77 votes), past polls