Help with script How to prepend 2 lines instead of 1

2011-01-21 Thread steve1040
Using the script below I need to add a second line with the following text: "STAGEHDR|Barcoded" #!perl use strict; use warnings; my $file = 'path/to/Access.csv'; my $newline = "ENTHDR|1|3.0"; { local @ARGV = ($file); local $^I = '.bac'; while(<>){ if ($. == 1) { print "$new

Script to prepend text to beginning of file

2011-01-21 Thread steve1040
I need to add 2 lines to a file and add the following text. ENTHDR|1|3.0 STAGEHDR|Barcoded I don't have any idea how to do this in Perl Thanks Steve -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/