I always run to modules when I have regexp problems:
It does what you want, but without splitting. I don't know if that's acceptable for you.#!/usr/bin/perl -w use strict; use File::Basename; my $fullpath = '\\Server\dir\user'; my $popped; my @fileparts; while($fullpath ne "" && ($popped = basename($fullpath)) ) { push @fileparts, $popped; $fullpath = dirname($fullpath); } for(@fileparts) {print "$_\n"}
In reply to Re: Splitting blunder
by perigeeV
in thread Splitting blunder
by helmex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |