|Don't ask to ask, just ask|
Re: It's the little things...by liverpole (Monsignor)
|on Mar 02, 2010 at 19:35 UTC||Need Help??|
What was your moment where a little thing just popped up and bit you on the toe?
Too many to even scratch the surface :), but one comes to mind...
When I first started with Perl, I would get the base part of a filename with:
Which is silly, of course. Why go to the shell when you've got Perl?
For a long while I then used something I thought much more clever:
Even as I type it now, my fingers still remember it from so much usage. It worked great, but only in Linux.
I finally started learning more about the available core modules, and now I know the way to go is:
As an aside to your meditation, if you're in Windows, you should be able to type just "filename" (without the .pl extension). If it doesn't work, you may have to edit your "Advanced system settings" (under System in the Control Panel), and add ";.PL" to the end of the PATHEXT variable in your "System Variables" list.