Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Unexpected parsing

by JadeNB (Chaplain)
on Dec 16, 2009 at 07:23 UTC ( [id://812985]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ( $c, $d );
    1 ? $c : $d = 'Hi';
    
  2. or download this
    my ( $c, $d );
    $c = 'Hi';
    
  3. or download this
    my $d;
    1 ? my $c : $d = 'Hi';
    
  4. or download this
    my $d;
    my $c = 'Hi';
    
  5. or download this
    $ perl -MO=Deparse -e 'my $c; 1 ? $c : my $d; $d'
    my $c;
    $c;
    $d;
    -e syntax OK
    
  6. or download this
    $ perl -e '1 ? my $c : my $d'
    Invalid separator character '$' in attribute list at -e line 1, near "
    +$c : my "
    Execution of -e aborted due to compilation errors.
    
  7. or download this
    our $d = 'Out';
    {
    ...
        $d = 'In';
    }
    say $d;
    
  8. or download this
    our $d = 'Out';
    {
    ...
        $d = 'In';
    }
    say $d;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://812985]
Approved by moritz
Front-paged by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-03-29 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found