Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Splitting blunder

by perigeeV (Hermit)
on Apr 08, 2002 at 19:00 UTC ( #157521=note: print w/replies, xml ) Need Help??

in reply to Splitting blunder

I always run to modules when I have regexp problems:

#!/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"}
It does what you want, but without splitting. I don't know if that's acceptable for you.

Replies are listed 'Best First'.
Re: Re: Splitting blunder
by helmex (Initiate) on Apr 08, 2002 at 23:26 UTC
    Thanks for all the leads.
    TYPO - I did escape the backslashes, posted wrong sorry

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://157521]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2023-12-07 13:02 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (32 votes). Check out past polls.