D
DeZo
Why does the following code:
line = " rows = 10 cols = 1 occupied cells = 0"
line =~ /.*(\d+).*(\d+).*(\d+)/
print(" scanned rows = ",$1," cols = ",$2," occ = ",$3,"\n")
print this when it runs:
scanned rows = 0 cols = 1 occ = 0
(notice rows is zero!)
What have I done wrong?
line = " rows = 10 cols = 1 occupied cells = 0"
line =~ /.*(\d+).*(\d+).*(\d+)/
print(" scanned rows = ",$1," cols = ",$2," occ = ",$3,"\n")
print this when it runs:
scanned rows = 0 cols = 1 occ = 0
(notice rows is zero!)
What have I done wrong?