Hi All,
I need to parse a simple text file (that includes only a single line) and copy the second variable to another file.
p.s. the variables in these line are separated by spaces.
Cheers.
Great, that should be easy to do.
1) Read in a file:
http://perldoc.perl.org/perlfaq5.html#How-can-I-read-in-an-entire-file-all-at-once%3f-slurp-file%2c-slurping
2) Find the data that you need
http://perldoc.perl.org/functions/split.html
3) Write out your new file:
http://perldoc.perl.org/functions/open.html
http://perldoc.perl.org/functions/print.html
http://perldoc.perl.org/functions/close.html
good luck