Jan 7, 2004 #1 Oostwijk Technical User Oct 19, 2003 82 0 0 NL How to retrieve the left character of the value from variable $line and store that character in a variable named $charact
How to retrieve the left character of the value from variable $line and store that character in a variable named $charact
Jan 7, 2004 #2 siberian Programmer Sep 27, 2003 1,295 0 0 US by 'left character' do you mean 'the first character'? Esay way is my @characters = split($line); my $char = $characters[0]; split() without a specification splits the characters into an array. Upvote 0 Downvote
by 'left character' do you mean 'the first character'? Esay way is my @characters = split($line); my $char = $characters[0]; split() without a specification splits the characters into an array.
Jan 7, 2004 #3 raklet MIS Aug 19, 2003 370 0 0 US Or you can do a substring on it: my $string = "Hello"; my $char = substr($string,0,1); print $char; Upvote 0 Downvote
Or you can do a substring on it: my $string = "Hello"; my $char = substr($string,0,1); print $char;
Jan 7, 2004 Thread starter #4 Oostwijk Technical User Oct 19, 2003 82 0 0 NL thanks Raklet, that works fine/ Upvote 0 Downvote