if ( /^$fname/ eq "s" ) { # how do I do the substitution?? printf "hello\n"; } #### $fname =~ s/^s/_S/;