Solution :
$string = "Just another Perl Hacker";
$first_char = substr( $string, 0, 1 ); # 'J'
To change part of a string, you can use the optional fourth argument
which is the replacement string.
substr( $string, 13, 4, "Perl 5.8.0" );
$string = "Just another Perl Hacker";
$first_char = substr( $string, 0, 1 ); # 'J'
To change part of a string, you can use the optional fourth argument
which is the replacement string.
substr( $string, 13, 4, "Perl 5.8.0" );
No comments:
Post a Comment