in reply to Re: A non-blocking socket operation could not be completed ?
in thread A non-blocking socket operation could not be completed ?

Um, well, I stole that code from this site:

http://developeronline.blogspot.com/2008/10/using-perl-against-facebook-part-i.html

Don't know why "our" is used there.

I do use it myself with Getopt::Std, as I was told that's the best way to declare a variable before it's actually used, e.g.:

use Getopt::Std; use strict; our($opt_i); # "our" allows strict use of this variable without clobbe +ring it getopts('i:');

Replies are listed 'Best First'.
Re^3: A non-blocking socket operation could not be completed ?
by Marshall (Canon) on May 17, 2016 at 17:58 UTC
    I apologize for getting off topic. Sounds like you have your problem solved with an LWP upgrade. But since we are already there...

    You can read more about "our" at our variables.

    If you "clobber" an "our" variable, you get a warnings, but it is still there and accessible with the full name. See demo code below. To declare a variable before use, "my" is almost always the "right answer", even with getopts.

    A "my" variable is completely "private" and cannot be accessed except in the scope and package in which it is declared. An "our" variable gets put into the package's symbol table and can be accessed by a different compilation unit, if the full name is used or if it is "exported" and "imported" by another package.

    #!usr/bin/perl use warnings; use strict; our $x = 99; my $x = 4; print "lexical my version of x=$x\n"; print "package version of x=$main::x"; __END__ "my" variable $x masks earlier declaration in same scope at C:\testing +\ourdemo.pl line 6. lexical my version of x=4 package version of x=99