![]() |
![]() |
10 entries, 1 page |
my @data = split(/ /, $temp1);
my ($firstString, secondString) = ($1, $3) if ($temp =~m/(\d+\.?\d+)(\s+)(\d+\.?\d+)/);
my ($first, $second) = split( " ", $temp);
split / /, $foo
split " ", $foo
split /\s+/, $foo
1
2
3
4
5
6
7
8
9
10
11
12
13
C:\>perl
$" = "|";
my $string = " 20 30 40 ";
my @x = split(" ", $string);
print "X: |@x|\n";
my @y = split(" ", $string, 10);
print "Y: |@y|\n";
my @z = split(/ /, $string, 0);
print "Z: |@z|\n";
^D
X: |20|30|40|
Y: |20|30|40||
Z: ||||20|30|40|
![]() |
![]() |
10 entries, 1 page |