Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: (Ovid) Re: Perl on Win98 vs. Win/NT/2000?

by jlongino (Parson)
on Sep 08, 2001 at 05:32 UTC ( [id://111103]=note: print w/replies, xml ) Need Help??


in reply to (Ovid) Re: Perl on Win98 vs. Win/NT/2000?
in thread Perl on Win98 vs. Win/NT/2000?

First of all, let me say that it is not my intention to come across sounding pompous. That type of attitude is abhorrent to me. However, I do word things as carefully as possible to avoid ambiguity and that sometimes may come across as sounding snobbish. So if it seems that way, apologies. I am rather frustrated and this post is the result of at least ten revisions to make it appear less so. I'm only disappointed in the disparate platform behaviours.

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:

#!/usr/local/bin/perl use strict; my @ls = `ls`; my $lsct = scalar(@ls); foreach (@ls) { print "line: ",$_; } print "\$lsct: $lsct\n\n";
Producing the following results:
line: hello.cgi line: obsfu.pl line: test.pl line: test.pl~ $lsct: 4
OTHOH, the following reboots a Win98 system without even a message:
use strict; my @dirlines = `dir`; my $dirsize = scalar @dirlines; foreach (@dirlines) { print "$_"; } print "\$dirsize: $dirsize\n";
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.

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

    I certainly did not think your post sounded either pompous or snobbish. I hope I didn't give you the impression that I thought that. I ran your snippet using backticks with dir. Output:

    Volume in drive C is OVID Volume Serial Number is 1A46-1A08 Directory of C:\WINDOWS\Desktop\Curtis' Stuff . <DIR> 01-27-01 9:14a . .. <DIR> 01-27-01 9:14a .. WWW <DIR> 11-18-00 11:45a WWW CGI_CO~1 <DIR> 09-30-00 2:31p cgi_course ARCHIVE1 <DIR> 08-25-00 9:53a archive1 PERL <DIR> 08-26-00 11:27a Perl TIDY <DIR> 10-15-00 5:33p tidy DK BAT 39 12-10-99 8:38p dk.bat ...[snip]... HTMLTO~1 PL 2,968 06-18-01 7:25p HTMLtoCGI.pl WEIRD~1 HTM 1,504 06-18-01 7:20p weird.html 17 file(s) 161,721 bytes 9 dir(s) 510,001,152 bytes free $dirsize: 33

    I am using Win98 and ActiveState 5.6.0 on my home machine. Perhaps I'm lucky, I don't know, but Perl has never caused any problems on my box.

    Cheers,
    Ovid

    Vote for paco!

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://111103]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2024-04-18 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found