T
Trudge
I've been having some odd behaviour lately on our work computer running the installed Apple Perl. I have the following few lines of code:
#!/usr/bin/perl
BEGIN
{
open (STDERR,">>$0-err.txt");
print STDERR "\n",scalar localtime,"\n";
}
use strict;
use warnings;
my $ext="pdf";
my $Source = "/Desktop/test1";
my $Destination = "/Desktop/test2";
print "Now running $0 ...\n";
print "\$ext: $ext\n";
print "\$Source: $Source\n";
print "\$Destination: $Destination\n";
However, there is no output to the Terminal window, and no entry is made in the log file. There should at least be a date/time stamp.
If I remove the 'shebang' line, the script outputs as expected, and an entry is made in the log file indicating the timestamp.
What gives?
#!/usr/bin/perl
BEGIN
{
open (STDERR,">>$0-err.txt");
print STDERR "\n",scalar localtime,"\n";
}
use strict;
use warnings;
my $ext="pdf";
my $Source = "/Desktop/test1";
my $Destination = "/Desktop/test2";
print "Now running $0 ...\n";
print "\$ext: $ext\n";
print "\$Source: $Source\n";
print "\$Destination: $Destination\n";
However, there is no output to the Terminal window, and no entry is made in the log file. There should at least be a date/time stamp.
If I remove the 'shebang' line, the script outputs as expected, and an entry is made in the log file indicating the timestamp.
What gives?