Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | 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. s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/ In reply to Re: It's the little things...
by liverpole
|
|