Assuming that all your path components are separated by "/", then you would simply use split again, and take the final component(s):
my @router_path_components = split qr{/}, $s_flds[0]; my $last_chunk = $router_path_components[-1];
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re^3: Formatting an array
by roboticus
in thread Formatting an array
by bartrad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |