in reply to How do I do character substitution on strings stored in a variable

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

Regards,
s++ą  ł˝ ął. Ş ş şą Żľ ľą˛ş ą ŻĽąş.}++y~-~?-{~/s**$_*ee

Replies are listed 'Best First'.
Re^2: How do I do character substitution on strings stored in a variable
by gcebulka (Initiate) on Oct 03, 2008 at 18:52 UTC
    Thank you!