Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2022-12-09 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?