Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Is there any efficient way i can take out a specific column from hundreds of files and put it in one file?

by thomas895 (Deacon)
on Sep 28, 2014 at 05:10 UTC ( #1102255=note: print w/replies, xml ) Need Help??


in reply to Is there any efficient way i can take out a specific column from hundreds of files and put it in one file?

Are you looking for split?
Perhaps something like the following:

my @columns = split /\s+/, $current_line;
-Thomas
"Excuse me for butting in, but I'm interrupt-driven..."
  • Comment on Re: Is there any efficient way i can take out a specific column from hundreds of files and put it in one file?
  • Download Code

Replies are listed 'Best First'.
Re^2: Is there any efficient way i can take out a specific column from hundreds of files and put it in one file?
by Laurent_R (Canon) on Sep 28, 2014 at 08:42 UTC
    Or possibly, to make the code shorter:
    my $third_col = (split /\s+/, $current_line)[2];
    But that does not solve the issues raised by other monks about the original post lacking far too many details for us to suggest an improvement to some code that we have not seen.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2021-04-13 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?