vccs has asked for the wisdom of the Perl Monks concerning the following question:
I have a piece of code
This piece of code works fine on HP-UX with version:# perl -v This is perl, v5.8.3 built for IA64.ARCHREV_0-thread-multi-LP64 But now that we are migrating to Linux (RedHat 6.6), the code fails on the command: open STDOUT, '>','/dev/null' or die "Can't write to $prout: $!"; putting this line into comment, then it works. Perl version on LINUX: perl -v This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi Any ideas what is causing this?#! /usr/local/bin/perl use Oraperl; use DBI; use FileHandle; use rf; use IO::Socket; use IO::Handle;; use POSIX qw(setsid); die "syntax: $0 port" if 1 > @ARGV; $port=$ARGV[0]; open STDIN, '>/dev/null' or die "Can't read /dev/null: $!"; print "Step 1\n"; open STDOUT, '>','/dev/null' or die "Can't write to $prout: $!"; print "Step 2\n"; open STDERR, '>/dev/null' or die "Can't write to $prerr: $!"; ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl migration hp-ux -> Linux ( perlport, File::Spec->devnull )
by Anonymous Monk on Aug 14, 2015 at 09:29 UTC | |
by vccs (Initiate) on Aug 14, 2015 at 11:03 UTC | |
by anonymized user 468275 (Curate) on Aug 14, 2015 at 11:27 UTC | |
Re: Perl migration hp-ux -> Linux
by pme (Monsignor) on Aug 14, 2015 at 09:12 UTC | |
by vccs (Initiate) on Aug 14, 2015 at 09:49 UTC | |
by Corion (Patriarch) on Aug 14, 2015 at 10:12 UTC | |
by pme (Monsignor) on Aug 14, 2015 at 10:20 UTC | |
by aitap (Curate) on Aug 14, 2015 at 10:20 UTC |
Back to
Seekers of Perl Wisdom