Z zink66 New Member Apr 23, 2006 #1 I'm attempting to use STDIN to get a phone number, i.e. 5554567 and I want to seperate that into different parts of an array, i.e. @array[0] = "5", @array[1] = "5", etc... So that I can use them. How do I do this?
I'm attempting to use STDIN to get a phone number, i.e. 5554567 and I want to seperate that into different parts of an array, i.e. @array[0] = "5", @array[1] = "5", etc... So that I can use them. How do I do this?
T texmex New Member Apr 24, 2006 #2 I can't imagine why you'd want to do it, but this should work: Code: my $number=<STDIN>; my @array=split(undef,$number);
I can't imagine why you'd want to do it, but this should work: Code: my $number=<STDIN>; my @array=split(undef,$number);