J
Jason Quek
Hi there
As the fields in my data table are not fixed, I need to do this:
# ------------------------------------------------------------
$name = 'John Doe';
$fields = '$firstname, $lastname';
($fields) = split(/\s/, $name);
print "$firstname"; # returns John
print "$lastname"; # returns Doe
# ------------------------------------------------------------
where line 3 is interpreted as:
# ------------------------------------------------------------
($firstname, $lastname) = split(/\s/, $name);
# ------------------------------------------------------------
How can this be accomplished? Any help would be appreciated. Thank
you.
Jason Q.
As the fields in my data table are not fixed, I need to do this:
# ------------------------------------------------------------
$name = 'John Doe';
$fields = '$firstname, $lastname';
($fields) = split(/\s/, $name);
print "$firstname"; # returns John
print "$lastname"; # returns Doe
# ------------------------------------------------------------
where line 3 is interpreted as:
# ------------------------------------------------------------
($firstname, $lastname) = split(/\s/, $name);
# ------------------------------------------------------------
How can this be accomplished? Any help would be appreciated. Thank
you.
Jason Q.