http://www.perlmonks.org?node_id=498373


in reply to Cross platform coding advice

It's very easy to develop on Windows for Linux, as long as you keep that in mind. Under Windows, mostly there are features lacking, like proper fork(), selectable filehandles and some other stuff, so if you follow what is outlined in perldoc perlport, you should be mostly going. The main problems are when you're interacting with the operating system, and that is mainly by opening files.

For installing modules on the Linux host, that is very easy as long as the modules are written in Perl, see A guide to installing modules for Win32, especially the "Manual install" section. In most cases, you can simply unpack the module distribution and copy all files into your application lib directory in the right directories.

Replies are listed 'Best First'.
Re^2: Cross platform coding advice
by nothingmuch (Priest) on Oct 08, 2005 at 15:54 UTC
    Don't use forward or backslashes, instead use File::Spec or Path::Class:
    use File::Spec; # could also use File::Spec::Functions my $file_name = File::Spec->catfile(File::Spec->updir, qw/foo bar.txt/ +); # "../foo/bar.txt" on unix # or use Path::Class; # these return Path::Class::File objects which can be used as strings # and also have some convenient methods ($file->open, etc) my $file_a = Path::Class->new()->parent->subdir("foo")->file("bar.txt" +); my $file_b = file(dir()->parent, "foo", "bar.txt');
    -nuffin
    zz zZ Z Z #!perl