Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Not sure how to handle this scope (updated)

by haukex (Bishop)
on Aug 18, 2021 at 18:04 UTC ( #11135934=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $self = OO->new( $cat );
    {
      my $inner_self = $ARGV[0] eq 'Fido' ? OO->new( $dog ) : $self;
      say $inner_self->species();
    }
    
  2. or download this
    my $self = OO->new( $ARGV[0] eq 'Fido' ? $dog : $cat );
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2022-05-18 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (70 votes). Check out past polls.

    Notices?