[26237] in Perl-Users-Digest
Perl-Users Digest, Issue: 8422 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 15 14:05:35 2005
Date: Thu, 15 Sep 2005 11:05:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 15 Sep 2005 Volume: 10 Number: 8422
Today's topics:
Re: Better way of checking file/directory spec in Win32 (Anno Siegel)
Re: FAQ 8.23 How can I open a pipe both to and from a c <crono@cc.gatech.edu>
Re: Perl portability <hendry.taylor@btinternet.com>
Re: Perl portability (Anno Siegel)
Re: Perl portability axel@white-eagle.invalid.uk
Re: Perl portability xhoster@gmail.com
Re: Perl portability <ddunham@redwood.taos.com>
Re: Perl portability <hendry.taylor@btinternet.com>
Re: Perl portability xhoster@gmail.com
Re: Perl portability axel@white-eagle.invalid.uk
Re: Perl portability <hendry.taylor@btinternet.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 15 Sep 2005 11:36:04 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Better way of checking file/directory spec in Win32?
Message-Id: <dgbmb4$5f0$1@mamenchi.zrz.TU-Berlin.DE>
Henry Law <news@lawshouse.org> wrote in comp.lang.perl.misc:
> Running under Activestate on Windows XP I have need to feed a series of
> directory and file specifications to a program, which then interprets
> them. Specifications can be directories, single file names, or wildcard
> combinations like c:\foo\bar\*.pdf which result in lists of matching files.
>
> The specifications need to be validated to weed out those that don't
> refer to an existing directory, or that result in no matching files.
My first idea when I read this was (untested):
my @valid = grep -e, map glob, @specs;
but you seem to want a more detailed analysis of each entry.
> I've Googled and searched CPAN for a module that does this, since it
> must be a common requirement, but without success. Can someone suggest one?
>
> Here's the subroutine I wrote to do the job, so you'll see what I'm
> trying to do. If it needs to exist then comments on how to smarten it
> up would be welcome.
>
> #! /usr/bin.perl
>
> use strict;
> use warnings;
>
> use constant VALID_DIRECTORY => -1;
> use constant VALID_FILE => -2;
[code that uses interpret_spec() snipped]
> sub interpret_spec{
> # Checks a file/directory specification. Returns
> # 0 Spec matches nothing
> # -1 It's a valid directory specification
> # -2 It's a valid single file specification
> # number It's a glob, resulting in "number" files
>
> my $spec = shift;
> return VALID_DIRECTORY if (-d $spec);
> return VALID_FILE if (-f $spec);
> my @globs = glob $spec;
> if (scalar @globs == 1){
^^^^^^
You don't need "scalar", it's already in scalar context.
> return ((-f $globs[0]) ? 1 : 0);
> } else {
> return scalar @globs;
> }
> }
There are issues with some forms of glob() that need looking at.
Under Unix, it is quite possible to have a file named like a glob
pattern: "touch '*.foo'" creates a file with an actual asterisk in
its name. The logic of interpret_spec() would detect the file first
and never try to expand the glob (which may hit several more files).
This problem may be void under windows, I don't know.
A different problem occurs with globs of the form "foo.{a,b,c}".
This expands to "foo.a", "foo.b" and "foo.c" with no check against
the file system, that is, it doesn't matter whether "foo.a" etc.
exist as files. That may result in unwanted answers.
Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
------------------------------
Date: Thu, 15 Sep 2005 11:11:40 -0400
From: "Omar Zakaria" <crono@cc.gatech.edu>
Subject: Re: FAQ 8.23 How can I open a pipe both to and from a command?
Message-Id: <dgc2u9$3a4$1@news-int2.gatech.edu>
"PerlFAQ Server" <comdog@panix.com> wrote in message
news:dg7iak$ej$1@reader1.panix.com...
> The IPC::Open2 module (part of the standard perl distribution) is an
> easy-to-use approach that internally uses pipe(), fork(), and exec()
to
> do the job. Make sure you read the deadlock warnings in its
> documentation, though (see IPC::Open2). See "Bidirectional
Communication
> with Another Process" in perlipc and "Bidirectional Communication with
> Yourself" in perlipc
Has anyone found this not to work on Windows?
Let me be more specific:
I'm using ActiveState perl version 5.6.0. When I try to use open2 in
windows,
the program stalls. I believe it's blocking for input, which as I understood
shouldn't really happen when using open2.
The following is the code I'm using:
#!/usr/bin/
use IPC::Open2;
use strict;
open2(\*READ, \*WRITE, "cmd.exe") || die "Could not open! $!\n";
print WRITE "echo We are the pirates who don't do anything!\n";
while (<READ>) {
print $_;
}
The program doesn't die, but starts blocking somewhere after the invocation
of open2(). I've found that closing the "WRITE" stream doesn't help at all.
However, I know that I _am_ actually printing to it, because if I change
the print statement from "echo ..." to "blah blah blah", I get a messsage
on STDERR saying "blah is not recognized as an internal or external ...
etc."
I take this to indicate that the blocking is actually happening during the
attempts
to read from READ, which would make sense if this were anything but open2().
A very similar script, which differs from this only in the program I try to
read/write
to/from, runs on Unix without a hitch.
(I guess it's worth it to mention that while in this example, I try to open
a read-
write pipe to cmd.exe, my actual script talks to a different program. The
end
result is the same for both of these, though. Figured I should make that
clear
in case someone thinks I'm trying to use open2 to invoke system commands.)
'preciate any input on the matter.
--
Omar Zakaria
------------------------------
Date: Thu, 15 Sep 2005 11:16:36 +0000 (UTC)
From: Hendry Taylor <hendry.taylor@btinternet.com>
Subject: Re: Perl portability
Message-Id: <dgbl6k$1e1$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com>
The perl -v on solaris produced the following:
This is perl, version 5.005_03 built for sun4-solaris
Copyright 1987-1999, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5.0 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
Jim Gibson wrote:
> In article <dga257$503$1@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com>, Hendry
> Taylor <hendry.taylor@btinternet.com> wrote:
>
>
>>I wrote a perl script and tested it on windows and it works fine. I then
>>moved it onto a solaris machine and now it says that there is a syntax
>>error with the following line of code:
>>
>>$user1 = "User name: ".$rec1[0];
>>
>>the line of code just before that is:
>>
>>@rec1 = split(/@/, $autotrack[$records]);
>>
>>
>>any ideas?
>>I can't see that there is anything uniquely windows about that. There is
>>a difference in the version of perl in that on the windows box I have
>>active state v5.8.6 and the solaris box has solaris perl 5.00.3 or
>>something like that.
>
>
> I see nothing wrong with those two lines, either. They compile fine on
> my non-windows machine also running 5.8.6. It probably has more to do
> with the very old version of Perl running on your Solaris system, but
> the line in question would seem to be acceptable Perl 4, so I have no
> idea what the problem is.
>
> Since this newsgroup is defunct, you have a much higher probability of
> getting your problem solved if you pose your question to
> comp.lang.perl.misc. It is best to post a complete, short program that
> illustrates your problem.
>
> What does 'perl -v' produce on your Solaris system?
>
> Posted Via Usenet.com Premium Usenet Newsgroup Services
> ----------------------------------------------------------
> ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
> ----------------------------------------------------------
> http://www.usenet.com
------------------------------
Date: 15 Sep 2005 12:01:46 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Perl portability
Message-Id: <dgbnra$5f0$2@mamenchi.zrz.TU-Berlin.DE>
[Newsgroups trimmed]
Sherm Pendley <sherm@dot-app.org> wrote in comp.lang.perl.misc:
> Jim Gibson <jgibson@mail.arc.nasa.gov> writes:
>
> > In article <dga257$503$1@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com>, Hendry
> > Taylor <hendry.taylor@btinternet.com> wrote:
> >
> >> I wrote a perl script and tested it on windows and it works fine. I then
> >> moved it onto a solaris machine and now it says that there is a syntax
> >> error with the following line of code:
> >>
> >> $user1 = "User name: ".$rec1[0];
> >>
> >> the line of code just before that is:
> >>
> >> @rec1 = split(/@/, $autotrack[$records]);
> >>
> > Since this newsgroup is defunct, you have a much higher probability of
> > getting your problem solved if you pose your question to
> > comp.lang.perl.misc.
>
> He did - it's cross-posted. (I've removed the defunct group from the list
> for this message.)
>
> I can't see anything wrong with the posted code either - but it's been so
> long since I've used 5.003 that I'm basically just guessing. :-(
I happen to have a 5.003 around. No syntax error with the two lines
above.
Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
------------------------------
Date: Thu, 15 Sep 2005 12:40:28 GMT
From: axel@white-eagle.invalid.uk
Subject: Re: Perl portability
Message-Id: <0ZdWe.69188$2n6.1065@fe3.news.blueyonder.co.uk>
In comp.lang.perl.misc Hendry Taylor <hendry.taylor@btinternet.com> wrote:
[On something Perlish]
But the subject line got me thinking... Perl portability... why
not Perl potability in the shape of a Perl beer mug? I have a vi
mug, so it is clearly achievable.
Axel
------------------------------
Date: 15 Sep 2005 14:50:53 GMT
From: xhoster@gmail.com
Subject: Re: Perl portability
Message-Id: <20050915105053.883$5Z@newsreader.com>
axel@white-eagle.invalid.uk wrote:
> In comp.lang.perl.misc Hendry Taylor <hendry.taylor@btinternet.com>
> wrote:
>
> [On something Perlish]
>
> But the subject line got me thinking... Perl portability... why
> not Perl potability in the shape of a Perl beer mug? I have a vi
> mug, so it is clearly achievable.
Is your vi mug turing complete?
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Thu, 15 Sep 2005 16:11:38 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: Perl portability
Message-Id: <_2hWe.1117$Jm.473@newssvr27.news.prodigy.net>
In comp.lang.perl.misc Hendry Taylor <hendry.taylor@btinternet.com> wrote:
> I wrote a perl script and tested it on windows and it works fine. I then
> moved it onto a solaris machine and now it says that there is a syntax
> error with the following line of code:
> $user1 = "User name: ".$rec1[0];
> the line of code just before that is:
> @rec1 = split(/@/, $autotrack[$records]);
Is that code within a BLOCK? What is the exact error string that you're
getting?
--
Darren Dunham ddunham@taos.com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
------------------------------
Date: Thu, 15 Sep 2005 16:18:48 +0000 (UTC)
From: Hendry Taylor <hendry.taylor@btinternet.com>
Subject: Re: Perl portability
Message-Id: <dgc6t8$gdb$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com>
Well here is the entire code it is rather long. It just says syntax
error on line 55 near $user1
#!/usr/bin/perl
use Tie::File;
use Switch;
sub trimwhitespace($);
sub nslookup();
$debug = 0;
chdir("/usr/local/home/autosys/seos_autotrack");
$auditrecords = 0;
$n = 0;
$srecords = 0;
$arecords = 0;
$index = 0;
$totalmatched = 0;
$totalunmatched = 0;
my @monthnames = (qw(dummy Jan Feb Mar Apr May Jun Jul Aug Sep Nov Dec));
open FILEREAD, "<seos_autotrack_day";
$runday = <FILEREAD>;
close FILEREAD;
$logfilename = "autotrack-seos-compare".$runday.".log";
use Fcntl 'O_RDWR', 'O_CREAT';
my $o = tie @logfile, 'Tie::File', $logfilename, mode => O_RDWR |
O_CREAT, dw_size => 512;
$logrecords = @logfile;
if ($logrecords > 0) {splice @logfile, 0, $logrecords;}
$o->STORE($n, "Debug mode set to: ".$debug);
open FILEREAD, "<seos_autotrack_date";
$rundate = <FILEREAD>;
close FILEREAD;
tie @servers, 'Tie::File', 'servers' || die "Can't open: $!\n";
foreach $server (@servers)
{
$iplist = nslookup($server, 'Address');
$serverlist{$iplist} = sprintf "%s",$server;
$serverlist1{$server} = sprintf "%s",$iplist;
print FILEWRITE "$server $iplist\n";
}
untie @servers;
local $now = time;
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
localtime(time);
$o->STORE(++$n, "Start time = ".$hour.":".$min.":".$sec);
@files = <autotrack_*-$runday.out>;
foreach $arrayfiles(@files) #foreach autotrack file
{
$records = 1;
$line = 1;
tie @autotrack, 'Tie::File', $arrayfiles || die "Can't open: $!\n";
$o->STORE(++$n, "Processing autotrack file: ".$arrayfiles);
foreach $item (@autotrack) #foreach autotrack record
{
switch ($line)
{
case 1
{
$rec1 = $autotrack[$records];
@rec1 = split(/@/, $autotrack[$records]);
$user1 = "User name: ".$rec1[0];
$user = $rec1[0];
$terminal = $rec1[1];
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, "user = ".$rec1[0]);
$o->STORE(++$n, "terminal = ".$rec1[1]);
}
++$line;
} #Close case 1
case 2
{
@datetime = split(/ /, $autotrack[$records]);
@rec21 = split(/\//, $datetime[0]);
$edate = sprintf "$rec21[0] $monthnames[$rec21[1]] $rec21[2]";
$edate1 = sprintf "Date: $rec21[0] $monthnames[$rec21[1]] $rec21[2]";
@rec22 = split(/:/, $datetime[1]);
$etime = sprintf "$rec22[0]:$rec22[1]";
$etime1 = sprintf "Time: $rec22[0]:$rec22[1]";
$edatetime = sprintf "$edate $etime";
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, "date = ".$edate);
$o->STORE(++$n, "time = ".$etime);
$o->STORE(++$n, "date time = ".$edatetime);
}
++$line;
} #Close case 2
case 3
{
$event = $autotrack[$records];
@rec3 = split(/ /, $event);
$command = trimwhitespace($rec3[0]);
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, "event = ".$event);
$o->STORE(++$n, "command = ".$command);
}
++$line;
} #Close case 3
case 4 { ++$line }
case 5
{
@rec5 = split(/:/, $autotrack[$records]);
$rec5[0] = trimwhitespace($rec5[0]);
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, $rec5[0]." = ".$rec5[1]);
}
++$line;
} #Close case 5
case 6
{
@rec6 = split(/:/, $autotrack[$records]);
$rec6[0] = trimwhitespace($rec6[0]);
$rec6[1] =~ s/^\s+//;
@rec61 = split(/ /, $rec6[1]);
foreach $array_element(@rec61)
{
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, "rec61: ".$rec61[$index]);
}
$rec61[$index] =~ s/\"//g;
switch ($rec61[0])
{
case "sendevent"
{
switch ($rec61[2])
{
case "SET_GLOBAL"
{
$class1 = "Class: as-gvar";
$class = "as-gvar";
}
case "FORCE_STARTJOB"
{
$class1 = "Class: as-job";
$class = "as-job";
}
else
{
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, "unmatched sendevent type");
}
}
}
}
else
{
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, "unmatched command");
}
}
}
++$index;
} #Close foreach specific array_element
@rec62 = split(/\=/, $rec61[4]);
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, $rec6[0]." = ".$rec6[1]);
$o->STORE(++$n, "rec62 = ".$rec62[0].", ".$rec62[1]);
}
$index = 0;
++$line;
} #Close case 6
else
{
if ($autotrack[$records] eq
":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
{
++$auditrecords;
$search = sprintf
"$edatetime.*$class.*$command.*$terminal|$serverlist1[$terminal]";
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, "Search value = ".$search);
$o->STORE(++$n, "Class = ".$class1.", resource = ".$rec62[0].", user
= ".$user1.", terminal = ".$terminal1.", date = ".$edate1.", time =
".$etime1);
}
$match = 0;
$array_files = "seosauditsuccess_".$terminal."_".$runday.".out";
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, "connecting to file: ".$array_files);
}
tie @seosaudit, 'Tie::File', $array_files || die "Can't open: $!\n";
foreach $array_element(@seosaudit)
{
++$srecords;
if ($array_element =~ m/Total Records Displayed.*/)
{
next;
} #Close if
if($array_element =~ m/($search)/)
{
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, "Class = ".$class1.", resource = ".$rec62[1].",
user = ".$user1.", terminal = Terminal: ".$terminal.", date =
".$edate1.", time = ".$etime1);
}
if ($match >= 6)
{
$found = 1;
$match = 0;
next;
}
} #Close if
if ($array_element =~ m/($class1)/)
{
++$match;
} #close if array_element
if ($array_element =~ m/Resource: ($rec62[0])\..*/)
{
++$match;
} #close if array_element
if ($array_element =~ m/($user1)/)
{
++$match;
} #close if array_element
if ($array_element =~
m/Terminal\:.*($terminal|$serverlist1[$terminal])/)
{
++$match;
} #close if array_element
if ($array_element =~ m/Program\:.*($command)/)
{
++$match;
} #close if array_element
if ($array_element =~ m/($edate1)/)
{
++$match;
} #close if array_element
if ($array_element =~ m/($etime1)/)
{
++$match;
} #close if array_element
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, "SeosAudit record = ".$array_element);
}
} #Close foreach
if ($found == 1)
{
$o->STORE(++$n, "Record found in the seosdb audit file: ".$array_files);
$found = 0;
$match = 0;
++$totalmatched;
}
elsif ($found == 0)
{
$o->STORE(++$n, "Record not found in the seosdb audit file!!!!
".$array_files);
$o->STORE(++$n, "Autotrack Data:\n\t".$class1.",\n\tResource:
".$rec62[0].",\n\t".$user1.",\n\t".$terminal1.",\n\tProgram:
".$command.",\n\t".$edate1.",\n\t".$etime1);
$found = 0;
$match = 0;
++$totalunmatched;
}
$line = 1;
untie @seosaudit;
} #Close if Last record of autotrack
elsif ($autotrack[$records] eq "")
{
$o->STORE(++$n, "\n\n");
} #Close else if
else
{
@recdef = split(/:/, $autotrack[$records]);
$recdef[0] = trimwhitespace($recdef[0]);
if ($debug == 1) #Create output if debug is on
{
$o->STORE(++$n, $recdef[0]." = ".$recdef[1]);
}
++$line;
} #Close else of last record if
} #Close of switch else for autotrack
} #Close of switch for autotrack
++$records;
# if ($records == 50)
# {
# $o->STORE(++$n, "Total unique Audit records read = ".$auditrecords);
# $o->STORE(++$n, "Total records matched = ".$totalmatched);
# $o->STORE(++$n, "Total records not matched = ".$totalunmatched);
# $now = time - $now;
# ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
localtime(time);
# $o->STORE(++$n, "End time = ".$hour.":".$min."$:".$sec);
# $o->STORE(++$n, "It took ".int($now / 3600).":".int(($now % 3600) /
60).":".int($now % 60). "to process ".$arecords." Autotrack records and
".$srecords." Seoasdb records");
# exit;
# }
}
untie @seosaudit;
untie @autotrack;
$arecords = $arecords + $records;
}
$o->STORE(++$n, "Total unique Audit records read = ".$auditrecords);
$o->STORE(++$n, "Total records matched = ".$totalmatched);
$o->STORE(++$n, "Total records not matched = ".$totalunmatched);
$now = time - $now;
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
localtime(time);
$o->STORE(++$n, "End time = ".$hour.":".$min.":".$sec);
$o->STORE(++$n, "It took ".int($now / 3600).":".int(($now % 3600) /
60).":".int($now % 60)." to process ".$arecords." autotrack records and
".$srecords." Seosaudit records");
untie @logfile;
# Function to remove whitespace from the begining and the end of a string.
sub trimwhitespace($)
{
my $string = shift;
$string =~ s/^\s+//;
$string =~ s/\s+//;
return $string;
}
sub nslookup() {
my ($host, $word) = @_;
open(NSLOOKUP, "nslookup $host 2>&1 |") || die "nslookup error";
while (<NSLOOKUP>) {
if (/Name:.*$host\.eur\.nsroot\.net/) {
$found = 1;
}
last if (/$word/ & $found == 1);
if (/\*\*\*/) {
print "nslookup says: $_";
die "*** nslookup error";
}
}
close(NSLOOKUP);
s/$word:\s*//;
chomp;
$found = 0;
return $_;
}
Darren Dunham wrote:
> In comp.lang.perl.misc Hendry Taylor <hendry.taylor@btinternet.com> wrote:
>
>>I wrote a perl script and tested it on windows and it works fine. I then
>>moved it onto a solaris machine and now it says that there is a syntax
>>error with the following line of code:
>
>
>>$user1 = "User name: ".$rec1[0];
>
>
>>the line of code just before that is:
>
>
>>@rec1 = split(/@/, $autotrack[$records]);
>
>
> Is that code within a BLOCK? What is the exact error string that you're
> getting?
>
------------------------------
Date: 15 Sep 2005 16:30:34 GMT
From: xhoster@gmail.com
Subject: Re: Perl portability
Message-Id: <20050915123034.356$vc@newsreader.com>
Hendry Taylor <hendry.taylor@btinternet.com> wrote:
> I wrote a perl script and tested it on windows and it works fine. I then
> moved it onto a solaris machine and now it says that there is a syntax
> error with the following line of code:
>
> $user1 = "User name: ".$rec1[0];
>
> the line of code just before that is:
>
> @rec1 = split(/@/, $autotrack[$records]);
This line by itself seems fine in perl -c, but deparse chokes on it:
[]$ perl -MO=Deparse,-p
@rec1 = split(/@/, $autotrack[$records]);
Can't call method "isa" without a package or object reference at
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/B/Deparse.pm line 1081. CHECK
failed--call queue aborted.
I don't know if this is somehow related to your problem or not.
I suspect your problem may stem from your use of Switch.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Thu, 15 Sep 2005 16:32:20 GMT
From: axel@white-eagle.invalid.uk
Subject: Re: Perl portability
Message-Id: <omhWe.15582$Kk3.10984@fe1.news.blueyonder.co.uk>
xhoster@gmail.com wrote:
> axel@white-eagle.invalid.uk wrote:
>> In comp.lang.perl.misc Hendry Taylor <hendry.taylor@btinternet.com>
>> wrote:
>> [On something Perlish]
>> But the subject line got me thinking... Perl portability... why
>> not Perl potability in the shape of a Perl beer mug? I have a vi
>> mug, so it is clearly achievable.
> Is your vi mug turing complete?
No idea. But it holds cider or wine quite happily.
Axel
------------------------------
Date: Thu, 15 Sep 2005 16:34:23 +0000 (UTC)
From: Hendry Taylor <hendry.taylor@btinternet.com>
Subject: Re: Perl portability
Message-Id: <dgc7qf$ie9$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com>
Is it possible that the switch is not fully supported.
If i were to take the switch out my code suddenly become alot more
complicated and I prefer KISS.
xhoster@gmail.com wrote:
> Hendry Taylor <hendry.taylor@btinternet.com> wrote:
>
>>I wrote a perl script and tested it on windows and it works fine. I then
>>moved it onto a solaris machine and now it says that there is a syntax
>>error with the following line of code:
>>
>>$user1 = "User name: ".$rec1[0];
>>
>>the line of code just before that is:
>>
>>@rec1 = split(/@/, $autotrack[$records]);
>
>
> This line by itself seems fine in perl -c, but deparse chokes on it:
>
> []$ perl -MO=Deparse,-p
> @rec1 = split(/@/, $autotrack[$records]);
> Can't call method "isa" without a package or object reference at
> /usr/lib/perl5/5.8.0/i386-linux-thread-multi/B/Deparse.pm line 1081. CHECK
> failed--call queue aborted.
>
> I don't know if this is somehow related to your problem or not.
>
> I suspect your problem may stem from your use of Switch.
>
> Xho
>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8422
***************************************