in reply to (Ovid) Re: Perl on Win98 vs. Win/NT/2000?
in thread Perl on Win98 vs. Win/NT/2000?
I have virgin installs of ActiveState Perl 5.6.1 on both my work and home Win98 SE systems. Apparently backtick functionally is severely crippled under Win98 (I'm sure the OS is primarily to blame). Still, I don't think it is unfair to expect similar functionality in this respect from Perl on both Unix and Win98 platforms. Unix users probably tend to use backticks more than Windows users because there is a weatlh of useful Unix commands, more so than with DOS.
Perhaps these two examples shed more light on the topic. The next runs fine on a Solaris 8 system:
Producing the following results:#!/usr/local/bin/perl use strict; my @ls = `ls`; my $lsct = scalar(@ls); foreach (@ls) { print "line: ",$_; } print "\$lsct: $lsct\n\n";
OTHOH, the following reboots a Win98 system without even a message:line: hello.cgi line: obsfu.pl line: test.pl line: test.pl~ $lsct: 4
I hope that everyone can see that one should be able to expect similar functionality from these examples. Apparently "backticks" eq "instant reboot" under Win98.use strict; my @dirlines = `dir`; my $dirsize = scalar @dirlines; foreach (@dirlines) { print "$_"; } print "\$dirsize: $dirsize\n";
I would certainly welcome tested backtick examples from Win98 users that would lead me to believe otherwise.
Update: `command /c dir` behaves as badly.
@a=split??,'just lose the ego and get involved!'; for(split??,'afqtw{|~'){print $a[ord($_)-97]}
|
---|
Replies are listed 'Best First'. | |
---|---|
(Ovid) Re(3): Perl on Win98 vs. Win/NT/2000?
by Ovid (Cardinal) on Sep 08, 2001 at 10:53 UTC |