Jan 7, 2004 #1 Oostwijk Technical User Joined Oct 19, 2003 Messages 82 Location 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 Joined Sep 27, 2003 Messages 1,295 Location 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 Joined Aug 19, 2003 Messages 370 Location 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 Joined Oct 19, 2003 Messages 82 Location NL thanks Raklet, that works fine/ Upvote 0 Downvote