[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



$target =~ s(^.*/)();


On Tue, 2004-06-15 at 21:24, Fletch wrote:
> >>>>> "Keith" == Keith R Watson <keith.watson at gtri.gatech.edu> writes:
> 
> [...]
> 
>     Keith> use File::Basename;
> 
>     Keith> my ($other_way, undef, undef) = fileparse($full_path,);
> 
>     Keith> print ($other_way, "\n");
> 
> Actually my $name = basename( $full_path ) would probably be better
> (not to mention the undefs are extraneous as any extra list elements
> would just be dropped; a more succinct way would have been
> 
> my $path = ( fileparse( $full_path ) )[0];


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00340" href="msg00340.html">[ale] Perl Regexe questions</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00330" href="msg00330.html">[ale] Perl Regexe questions</a></strong>
<ul><li><em>From:</em> keith.watson at gtri.gatech.edu (Keith R. Watson)</li></ul></li>
<li><strong><a name="00331" href="msg00331.html">[ale] Perl Regexe questions</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00333.html">[ale] glibc compatibility problem</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00336.html">[ale] MySQL training?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00331.html">[ale] Perl Regexe questions</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00340.html">[ale] Perl Regexe questions</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00334"><strong>Date</strong></a></li>
<li><a href="threads.html#00334"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>