Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

'our' is not 'my'

by Ovid (Cardinal)
on Aug 16, 2001 at 21:05 UTC ( #105446=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
  2. or download this
        my $foo;
        my $POST_MAX;
        my @bar;
  3. or download this
        Global symbol "$foo" requires explicit package name at C:\ 
    +line 2.
  4. or download this
        package foo;
        use strict;
        our $bar;   # These are the same
        $foo::bar;  # These are the same
  5. or download this
        our $field;
  6. or download this
        use strict;
        for ( 1 .. 3 ) { &doit }
            our $foo;
            print ++$foo . "\n";
  7. or download this
        $main::sql = $order->lineItemSQL;
        $main::dbh->prepare( $main::sql );
  8. or download this
        our ( $sql, $dbh );
        $sql = $order->lineItemSQL;
        $dbh->prepare( $sql );
  9. or download this
        use strict;
            $foo = "Ovid";
        print $foo;
  10. or download this
        use strict;
            $foo = "Ovid";
        print $main::foo;
  11. or download this
        use strict;
        my $foo = 'bar';
        print $foo;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://105446]
Approved by root
[Lady_Aleena]: Well, just go to source or raw and look over the pod, it may be in there.
[Lady_Aleena]: I recently found perldoc and get a warm fuzzy when I read a POD I wrote as if it were a real offical thing.
[atcroft]: Lady_Aleena: I know that they used the L<text|url> syntax to link to them, but I was wondering if there was a more "standard" way (for instance, if the L<module_name> syntax might work better).
[Lady_Aleena]: atcroft, I"m trying to think of a module I've used that linked to another module.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2017-05-27 04:09 GMT
Find Nodes?
    Voting Booth?