Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Context: compile-time vs. run-time

by ikegami (Pope)
on Jan 25, 2009 at 16:50 UTC ( #738783=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @x = ( f(), g(), h() );
    
  2. or download this
    $x = ( f(), g(), h() );
    
  3. or download this
    ( f(), g(), h() );
    1;
    
  4. or download this
    sub { ( f(), g(), h() ) }
    
  5. or download this
    @x = sub { ( f(), g(), h() ) }->();
    
  6. or download this
    $x = sub { ( f(), g(), h() ) }->();
    
  7. or download this
    use strict;
    use warnings;
    ...
    print('cs: ');  $x = sub { ( cx(), cx(), cx() ) }->();  print("\n\n");
    print('l:  ');  @x =       ( cx(), cx(), cx() )      ;  print("\n");
    print('cl: ');  @x = sub { ( cx(), cx(), cx() ) }->();  print("\n");
    
  8. or download this
    v:  vvv
    cv: vvv
    ...
    
    l:  lll
    cl: lll
    
  9. or download this
    use strict;
    use warnings;
    ...
    my $x;
    $x =       ( 'abc', 'def' )      ;  # Warns
    $x = sub { ( 'abc', 'def' ) }->();  # Doesn't warn
    
  10. or download this
    Useless use of a constant in void context at line 5.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-09-17 23:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (100 votes), past polls