| Olego ( @ 2008-10-08 19:22:00 |
Perl + Batch?
I saw this trick today, and it totally blew my mind. Read the next few lines carefully.
While it's true that `perl -x` can be used to accomplish roughly the same, the trick above is just... beautiful.
(Source: http://www.informit.com/articles/articl e.aspx?p=29328&seqNum=5)
I saw this trick today, and it totally blew my mind. Read the next few lines carefully.
@REM = ' = Perl in Batch = ';
@REM = ' = Read this carefully
@ECHO OFF
perl -w %~dpnx0 %*
goto :EOF
';
print "Hello, now I'm in Perl!\n";
While it's true that `perl -x` can be used to accomplish roughly the same, the trick above is just... beautiful.
(Source: http://www.informit.com/articles/articl