Re: Filename modification

2002-09-23 Thread Tanton Gibbs
> ($filename,$fileExtention)=fileparse($moofile, '\..*'); > open (OUTFILE1, ">$filename_TEMP.LOG"); > Perl thinks you are trying to access a variable named $filename_TEMP. What you want to say is open( OUTFILE1, ">${filename}_TEMP.LOG" ); HTH, Tanton -- To unsubscribe, e-mail: [EMAIL PROTEC

Re: Filename modification

2002-09-23 Thread John W. Krahn
Henry Wong wrote: > > Actually, my code is something like this: > > print "\n\n\nPLEASE ENTER REQUIRED .LOG FILE:"; > $file = ; > chomp ($file); > open (INFILE1, "$file"); > > So how can I use the $file variable to be splitted from its *.log and then > subsequently using it for appending to a "

Re: Filename modification

2002-09-23 Thread Henry Wong
z "$filename", the filename comes out smoothly. Pls advise? Regards, ~ HENRY WONG ~ - Original Message - From: "NYIMI Jose (BMB)" <[EMAIL PROTECTED]> To: "Henry Wong" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, S

Re: Filename modification

2002-09-23 Thread Sudarshan Raghavan
On Mon, 23 Sep 2002, Henry Wong wrote: > Actually, my code is something like this: > > print "\n\n\nPLEASE ENTER REQUIRED .LOG FILE:"; > $file = ; > chomp ($file); > open (INFILE1, "$file"); > > So how can I use the $file variable to be splitted from its *.log and then > subsequently using it f

RE: Filename modification

2002-09-23 Thread NYIMI Jose (BMB)
Give a look to File::Basename module. http://search.cpan.org/author/JHI/perl-5.8.0/lib/File/Basename.pm José. > -Original Message- > From: Henry Wong [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 23, 2002 9:17 AM > To: [EMAIL PROTECTED] > Subject: Re: Filena

Re: Filename modification

2002-09-22 Thread Henry Wong
al Message - From: "Dharmender Rai" <[EMAIL PROTECTED]> To: "Henry Wong" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, September 23, 2002 2:53 PM Subject: Re: Filename modification > Read the name of the file from STDIN. Assign it to > som

Re: Filename modification

2002-09-22 Thread Dharmender Rai
Read the name of the file from STDIN. Assign it to some scalar variable. Using that variable, you can open this file. You can have other scalar variable that can be assigned the name of this file appended with whatever you want (like "_temp" etc) and eiher open it (if it is there) or create it.