Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Gratuitous use of Perl Prototypes

by grantm (Parson)
on Nov 08, 2004 at 22:39 UTC ( #406231=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
      sub PUSH {
        my(@array, @new_items) = @_;
      my @target = ('RED', 'GREEN');
      PUSH(@target, 'blue');
  2. or download this
      sub PUSH {
        my($array, @new_items) = @_;
      my @target = ('RED', 'GREEN');
      PUSH(\@target, 'blue');
  3. or download this
      sub PUSH (\@@) {
        my($array, @new_items) = @_;
      my @target = ('RED', 'GREEN');
      PUSH @target, 'blue';
  4. or download this
         sub border_style ($$$) {
  5. or download this
         sub border_style {
           my($width, $style, $colour) = @_;
  6. or download this
        sub border ($;$$) {
          my($width, $style, $colour) = @_;
          return "border: $width $style $colour;";
  7. or download this
        print border('1px'), "\n";
  8. or download this
        my @args;
        push @args, $selected ? '5px' : '1px';
        push @args, 'red' if $selected;
        print border(@args), "\n";
  9. or download this
        "border: 5px dashed red;"
  10. or download this
        "border: 3 solid black;"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://406231]
Approved by Arunbear
Front-paged by hsmyers
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2015-11-30 03:09 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (756 votes), past polls