> > use strict; > use warnings; > use Tie::File; > > my @array; > tie @array, 'Tie::File', FILENAME or die "Couldn't open file: $!" > > unshift @array, <<'END_PREPEND'; > ENTHDR|1|3.0 > STAGEHDR|Barcoded > END_PREPEND >
Haven't tested it, but it should work. http://perldoc.perl.org/Tie/File.html Brian. On Thu, Jan 20, 2011 at 3:57 PM, steve1040 <[email protected]> wrote: > 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: [email protected] > For additional commands, e-mail: [email protected] > http://learn.perl.org/ > > >
