Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-26 06:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found