Jennifer Pan wrote: > 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 I am not certain of your example but try this: $FILENAME = <STDIN>; chomp $FILENAME; $output = "$FILENAME.yyy"; print "$output\n"; Steve
- concatenate $FILENAME and .yyy Jennifer Pan
- Re: concatenate $FILENAME and .yyy Stephen LeClaire
- Re: concatenate $FILENAME and .yyy Craig S Monroe
- Re: concatenate $FILENAME and .yyy Craig S Monroe
- Re: concatenate $FILENAME and .yyy Paul
- RE: concatenate $FILENAME and .yyy Mooney Christophe-CMOONEY1