Use:if ( /^$fname/ eq "s" ) { # how do I do the substitution?? printf "hello\n"; }
$fname =~ s/^s/_S/;
In reply to Re: How do I do character substitution on strings stored in a variable
by Andrew Coolman
in thread How do I do character substitution on strings stored in a variable
by gcebulka
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |