in reply to thanks, i'm new. rtfm right? :)
# variable has a return on the end, possibly $variable= "file_name_text.txt\n"; chomp $variable; # removes the return but won't remove non-whitespace +. $variable =~ s/\.txt$//; # now variable has no ".txt" on the end.
Look at the documentation for regular expressions (perldoc perlre) too learn more about that last line. I'd like to help more but your explanation was kinda scattered so I'm not sure what you are really asking. I do know that backtick line looks real evil to me. I think you need a "\" in front of the "$9" so that it won't freak out perl but I'm not sure.
--
$you = new YOU;
honk() if $you->love(perl)
|
|---|