Re: Returning specific data from a webpage?



A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx> wrote in comp.lang.perl.misc:
> Gunnar Hjalmarsson <noreply@xxxxxxxxx> wrote in
> news:3j3129Fnr3sdU1@xxxxxxxxxxxxxx:
>
> > demolitionz@xxxxxxxxx wrote:
> >> A. Sinan Unur wrote
> >>>
> >>> Those should be
> >>> use strict;
> >>> use warnings;
> >>> Case matters in Perl.
> >>> Please read the posting guidelines for this group.
> >>
> >> Sorry, I was following the guidelines but I used the wrong case in
> >> the actual script itself and so copied and pasted wrong. Newbie
> >> mistake (we were all newbies once, remember?)
> >
> > Now you are lying, don't do that!! If you had used wrong cases in the
> > actual script, the program hadn't compiled, and you hadn't talked
> > about "successfully receiving a response page".
>
> The OP might be on Windows where the case insensitive nature of the
> operating system can play nasty tricks on the unsuspecting individual.
> Indeed:
>
> D:\Home\asu1> cat ttt.pl
> #!/usr/bin/perl
>
> use Strict;
> use Warnings;

Same for Mac (OS X or earlier), at least when run on a case-insensitive
file system.

At first sight it looks pretty harmless, after all Perl finds the
intended module, so all is fine. However, a potential import()
method in the module will *not* be found because Perl looks for
->Warnings::import (in the case of "warnings"), where case matters.
This doesn't lead to an error message either (only if parameters were
given).

So the module *has* been loaded, but then some things the code expects
to be done have *not* been done. The resulting situation can be very
confusing.

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.
.



Relevant Pages

  • Re: attacks: detection and respond
    ... All these, except perl, have a reasonable size. ... the main problem with IDS systems is that attacks ... documentation provided in the operating system man pages. ... users can decide if they want or not to install it. ...
    (comp.unix.bsd.openbsd.misc)
  • Re: Top Turds of comp.lang.perl.misc (2007)
    ... As a struggling Perl newbie, I derive little encouragement to pursue my ... different programming path while I'm still embryonic. ... Perl isn't offered in the BSc/CS curriculum? ... : offensa. ...
    (comp.lang.perl.misc)
  • Re: 70 yr old needs help - reactivating XP
    ... bottom of your computer. ... operating system and you only use this when installing XP. ... The information in this mail/post is supplied "as is". ... sector on the hard disk but I didn't know how to get to it. ...
    (microsoft.public.windowsxp.general)
  • Re: Output files to text document
    ... directory and subdirectorys) into a text file. ... operating system for the file names in the file system so if you are provided a file name from the operating system it must therefore exist and subsequently testing for its existence is superfluous. ... Perhaps your operating system provides a program like 'cron' or 'at' that lets you run your program at scheduled intervals. ... If you really want to do it in Perl please let us know. ...
    (perl.beginners)
  • Re: need help parsing file for output
    ... I have only the basic - no add-on modules except what comes with Perl ... output all numerics inside double quotes to the number inside the ... column two (top to bottom), ... # 4) ignore lines with only commas ...
    (perl.beginners)