Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: OUR declaration

by shmem (Chancellor)
on Sep 23, 2006 at 07:26 UTC ( [id://574491]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ourVAR = "123 ABC";
      {
    ...
    __END__
    my  packAA  ourVAR = 456 RST
    our packAA  ourVAR = 123 ABC
    
  2. or download this
    package Foo;
    our $foo = 'bar';
    
    package main;
    print $foo,"\n";   # bar
    
  3. or download this
    # file foo.pl
    use strict;
    our $shared = "one fish";
    
  4. or download this
    # file bar.pl
    use strict;
    our $shared =~ s/e f/e half f/;
    
  5. or download this
    #/usr/bin/perl
    use strict;
    ...
    print $shared,"\n";
    __END__
    one half fish
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://574491]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-25 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found