A lazier way is:my @foo = qw[ a b c d e f ]; my $foo_count = @foo; # $foo_count is 6 my $foo_last = $foo[$foo_count]; # There is no $foo[6] so undef my $real_last = $foo[-1]; # Always works
(split(/\//, $bar))[-1]
In reply to Re^2: Regex a URL
by tadman
in thread regex a url
by andrew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |