Well, I did try that with $ARGV[0], but to no avail. Yes, I had posted a POC. Here is the true code that would not print the file-name. What am I doing wrong?
perl -pe '$_ = "$ARGV[0] \t $_"' trace.txt -----Original Message----- From: Jose Alves de Castro [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 12:40 PM To: Arul, Rex Cc: [EMAIL PROTECTED] Subject: Re: Inline Edit -- File name On Wed, 2004-09-22 at 15:24, [EMAIL PROTECTED] wrote: > How will I get the file name when I do an inline edit like this: > > perl -i.orig -pe '$_ = <filename> $_' filename That won't compile, but I believe you're posting something like a proof of concept rather then code... If I get this correctly, you're looking for the $ARGV variable. Check out: perldoc perlvar > How would I get the file name in <filename>? > > Thanks, > Rex -- José Alves de Castro <[EMAIL PROTECTED]> http://natura.di.uminho.pt/~jac -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>