> -----Original Message-----
> From: The Black Man [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 04, 2001 12:50 PM
> To: [EMAIL PROTECTED]
> Subject: matching EOF within a regex
> 
> 
> Hi all,
> 
> I'm trying to quickly insert a newline at the end of a
> bunch of files, but haven't been able to find an EOF
> metacharacter for use within a regexp.  Anyone have
> any sugestions?

regular expressions deal with strings, not files.

If you want to add something to the end of a string,
you should use concatenation, not a regex. If you want
to add something to the end of a file, you should open
the file in append mode.

   open F, ">>file.txt" or die $!;
   print F "\n";
   close F;

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to