in reply to Re^5: simple array question
in thread simple array question
#!/usr/bin/perl -w use strict; my $compass_string = "NW N X NE"; my @headings = split(/\s+/,$compass_string); foreach my $heading (@headings) { print "$heading\n"; } __END__ prints: NW N X NE
|
|---|