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]}

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.