You can also do this with a simple regexp matching 'non-whitespace characters followed by end of string'.
#!/usr/bin/perl -w use strict; my $test = "something something this"; $test =~ /(\S*)$/; print "Got $1\n";
In reply to Re: parse a string
by Molt
in thread parse a string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |