I forgot the beginning in my example:

$filename = <STDIN>;
chomp($filename);
$output = "$filename" . ".yyy";
$output =~ s/xxx/x/;
print $output;


Craig 
[EMAIL PROTECTED]
Pager
Numeric: 1-877-895-3558
Email pager: [EMAIL PROTECTED]
--------------------------------------------------------------
You will never find time for anything.
If you want time, you must make it.

Charles Buxton

----- Original Message ----- 
From: "Craig S Monroe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 12, 2001 5:27 PM
Subject: Re: concatenate $FILENAME and .yyy


Didn't you say you wanted the file to be named x.txt.yyy?
how about?


$filename = "xxx.txt";
$output = "xxx.txt" . ".yyy";
$output =~ s/xxx/x/;
print $output;

Craig 
[EMAIL PROTECTED]
Pager
Numeric: 1-877-895-3558
Email pager: [EMAIL PROTECTED]
--------------------------------------------------------------
You will never find time for anything.
If you want time, you must make it.

Charles Buxton

----- Original Message ----- 
From: "Jennifer Pan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 12, 2001 4:49 PM
Subject: concatenate $FILENAME and .yyy


Hello all, 

I stdin a file name: xxx.txt
and I would like to have a output file name called x.txt.yyy

This is how I do it 

$FILENAME = <STDIN>;
$output = "$FILENAME.y";
print "$output";


And the result is only
.yyy

How do I concatenate $FILENAME and .yyy? 

Thank you



Reply via email to