Results 1 to 2 of 2
Hey guys,
Im somewhat new at perl and was wondering if there was a way to run a perl script or tool made from perl, from a USB pen that ...
- 05-23-2011 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 3
Perl from USB pen to run on both linux and windows
Hey guys,
Im somewhat new at perl and was wondering if there was a way to run a perl script or tool made from perl, from a USB pen that would work both on Linux and on Windows?
Thank you
Any help would be greatly appreciated.
- 06-03-2011 #2Just Joined!
- Join Date
- May 2011
- Posts
- 44
short answer:
Yes, the Perl interpreter is platform specific, but the Perl code is (or -can- be) platform independent.
There are some caveats. Specifically file paths are different.
However, Perl does understand the following are equivalent.
I do believe that file paths are not case sensitive, tho I am unable to test this at this time.Code:my $path = 'C:\foo\bar\'; my $path = 'C:/foo/bar/';
the windows shbang line looks different
but if you invoke the program through Perl from the CLI.Code:#!C:/perl/perl.exe
e.g.:
shbang doesn't matter.Code:perl foo.pl
Also, you can't use linux system commands on a windows box, and vice versa. Stick to the Perl library.


Reply With Quote