Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

MidLifeXis's scratchpad

by MidLifeXis (Monsignor)
on Jun 01, 2004 at 18:01 UTC ( [id://358325]=scratchpad: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!perl
    
    ...
    my $output = $stylesheet->output_string($transformed);
    
    print $output;
    
  2. or download this
    my $load_task =
        ref($task) eq 'ARRAY' && $load eq 'bed clothes'    ? $task->[1] :
        ref($task) eq 'ARRAY' && $load ne 'bed clothes'    ? $task->[0] :
                                                             $task
    ;
    
  3. or download this
    my $load_task =
        ref($task) ne 'ARRAY'         ? $task      :
        $load      eq 'bed clothes'   ? $task->[1] :
        $load      ne 'bed clothes'   ? $task->[0] :
    die "huh?";
    
  4. or download this
    #!/usr/bin/perl -W 
    
    ...
    
      return @fileList;
    }
    
  5. or download this
    $ perl -MTest::More -e 'plan "no_plan"; print use_ok("Does::Not::Exist
    +"), "\n"; print pass("This is ok"), "\n"'
    not ok 1 - use Does::Not::Exist;
    ...
    1
    1..2
    # Looks like you failed 1 test of 2.
    
  6. or download this
    $ perl -MTest::More -e 'plan "no_plan"; BEGIN {print use_ok("Does::Not
    +::Exist"), "\n"} print pass("This is ok"), "\n"'
    ok 1 - This is ok
    1
    1..1
    
  7. or download this
    if ($a ||    # Some reason
        $b       # Some other reason
    
  8. or download this
    BEGIN {
      my $success = eval {
    ...
      };
      isnt($success, 1, "eval of use_ok failed (as expected)");
    }
    
  9. or download this
    BEGIN {
        if ($foo) { die "this case should not succeed"; }
    }
    
  10. or download this
    use strict;
    use warnings;
    ...
    }
    close ($ifh);
    
  11. or download this
    my $nics = qx |/sbin/ifconfig| or die("Can't get info from ifconfig: $
    +!\n");
    my @nics = split /(?<=\n)(?=\w)/, $nics;
    ...
        # this statement needs work.
        #  print "Device: $a\n\tIPv4: $b\n\tBcast: $c\n\tMask: $d\n\tIPv6:
    + $e\n";
    }
    
  12. or download this
    use strict;
    use warnings;
    ...
    # This should really be explicit about the \r\n
    print "Content-Type: text/plain\n\n";
    print 'Hello World';
    
  13. or download this
    use strict;
    use warnings;
    ...
    
    <tr><td>Neither</td><td>Will</td><td>This</td></tr>
    
  14. or download this
    use Win32::OLE::Variant;
    ...
    $property->{Value} =
        Win32::OLE::Variant->new(VT_BOOL, 0xFFFFFFFF);
    
  15. or download this
      $blah->Disconnect;
      $blah = Vendor::Lib->Connect(...);
    
  16. or download this
      $blah->Disconnect;
      $blah = undef;
      $blah = Vendor::Lib->Connect(...);
    
  17. or download this
    (cd d1 && find .) | sort > out.1
    (cd d2 && find .) | sort > out.2
    diff out.1 out.2
    
  18. or download this
    #!/bin/ksh
    
    ...
          break
        fi
    done
    
  19. or download this
    #!/bin/ksh
    
    ...
          exec ./what_you_want_to_do *.pl
        fi
    done
    
  20. or download this
    #!perl
    
    ...
    
    print "\n\n", "End", "\n\n";
    print join("\n", keys %checkthese), "\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2024-04-23 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found