Because "." has a special meaning in regular expressions. Try escaping it:
#!/usr/bin/perl print "Content-type: text/html\n\n"; my $latitude = -88.66666; my @values = split(/\./, $latitude); print "$values[0] xxxx $values[1]";
btw, the quotes around $latitude are not necessary.
In reply to Re: Splitting String???
by ikegami
in thread Splitting String???
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |