Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 contemplating the Monastery: (12)
As of 2015-07-30 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls