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

NateTut's scratchpad

by NateTut (Deacon)
on Jun 17, 2005 at 14:59 UTC ( #467754=scratchpad: print w/ replies, xml ) Need Help??


Newest Nodes
User Settings
Simple Module Tutorial # # Text Editor One Liner # perl -MTk -MTk::TextUndo -e "(tkinit)->Scrolled('TextUndo')->pack; MainLoop" # # CSS Stylesheet # body { background-color: #aaa; color: #002; font-family: avantgarde, verdana, Georgia, sanserif; padding: 0; padding-right: 1%; padding-left: 1%; margin-top: 0; } div#titlebar iframe { position: absolute; left: 1cm; border: none; } h1 { text-align: center } h1, h2, h3, h4, h5, h6 { font-family: "times new roman", palatino, modern, "zapf chancery", avantgarde, serif; size: 110% } h1#sitename { position: absolute; right: 3cm; top: 4mm; } h1#sitename a, h1#sitename a:visited, h1#sitename a:hover { text-decoration: none; color: green; } hr { height: 0px; background-color: navy; color: white; border 1px solid navy; width : 80%; } a { color: #00a; text-decoration: none; } a:visited { color: green } a:hover { text-decoration: underline } body div.title { font-weight: bold; padding-bottom: 10px; } body div.notice { background-color: navy; border: 1px solid navy; text-align: center; padding: 10px; margin-bottom: 10px; } ul.replies { padding: 20px; border-top: 1px solid navy; } ul.replies li { list-style: none; } li.reply div.header { background-color: navy; border: 1px solid navy; padding: 5px; } li.reply div.body { padding: 20px; } div.chatmessages { font-size: 70%; } div#nodebody { background-color: #fff; border: 1px solid #00a; width: 74%; float: right; padding: 5mm; z-index: 10; margin-bottom: 1cm; } div.nodelets { float: left; width: 20%; font-size: smaller; margin-bottom: 1cm; z-index: -10; } body div#footer, div#titlebar { border: 1px solid #00a; background-color: white; clear: both; margin-top: 5mm; margin-bottom: 5mm; } div#titlebar { padding: 1mm; padding-bottom: 0mm; } div#footer { font-size: smaller; padding: 4mm; text-align: center; } div.nodelets div.nodelet { margin: 2px; margin-bottom: 5mm; } div.nodelets div.nodelet div.head { padding: 5px; } div.nodelets div.nodelet div.head a { text-decoration: none; } div.nodelets div.nodelet div.head a:hover { text-decoration: underline; } div.nodelets div.nodelet div.head img { border: 0mm; vertical-align: middle; margin: 0mm; } div.nodelets div.nodelet div.head span.controls { float: right; } span.controls img.remove { padding-left: 4px; border-left: 1px solid navy; } div.nodelets div.nodelet div.body { padding: 5px; font-family: serif; } input, select, textarea, checkbox { border: 1px solid #00a; padding: 1px; color: #002; } input, select, option, checkbox { -moz-border-radius: 2mm; } textarea { -moz-border-radius: 3mm; margin-bottom: 5mm; } submit { background-color: navy; } div.section { padding: 10px } div.section div.node div.head { background-color: #aaf; border: 1px solid navy; padding: 5px; } div.section div.node div.body { padding: 20px; } div.section div.node div.reply { padding: 5px 0 5px 0; text-align: center; } div.section { background-color: white; border: none; } #patchlist { border: 0; margin: 4px; } #patchlist th.applied { text-align: right } #patchlist td.applied { text-align: right } #patchlist td { border: 0 } #patchlist th { padding: 2px; border: 0; text-align: left; background-color: navy; font-size: 11pt; } div#nodelet348608 { height: 12cm; } div#nodelet348608 iframe { height: 10.5cm; } div.showcontainer { border: 1px solid #0f0 } div.containername { background-color: navy; border-bottom: 1px solid #0f0 } body { background-color: navy; } a { color: #006; } a:visited { color: green } body div.notice { background-color: navy; } li.reply div.header { background-color: navy; } div#nodebody { border: 1px solid #00a; } div.section div.node div.head { background-color: navy; } #patchlist th { background-color: navy; } div#nodebody, div.nodelets div.nodelet, div#footer, div#titlebar { } body, body div.notice, li.reply div.header, div.section div.node div.head, #patchlist th {} div.nodelet div.head, div.nodelet div.body, div#titlebar, div#footer, div#nodebody, div.header { background-color: #efefff; border: 1px solid #00a; } div#titlebar, div#footer, div#nodebody, div.header { -moz-border-radius: 3mm; } div.nodelet div.head { -moz-border-radius-topleft: 3mm; -moz-border-radius-topright: 3mm; } div.nodelet div.body { -moz-border-radius-bottomleft: 3mm; -moz-border-radius-bottomright: 3mm; } div.nodelet div.head { margin-bottom: 1mm; } body, body div.notice, li.reply div.header, div.section div.node div.head, #patchlist th /* { background-image: url(http://petruchio.perlmonk.org/navybrick.jpg) }*/ textarea { width: 100%; height: 460px; } /* Mozilla form-styling code, stolen from http://kmgerich.com/archive/000072.html */ /* inputtype="text", inputtype="password", input:not(type) { border: 2px solid !important; -moz-border-top-colors: #888 #ccc; -moz-border-left-colors: #ccc #fff; -moz-border-right-colors: #ccc #fff; -moz-border-bottom-colors: #ddd #fff; } button, inputtype="reset", inputtype="button", inputtype="submit", select:not(multiple) { border: 2px solid !important; -moz-border-bottom-colors: #999 #ddd; -moz-border-left-colors: #777 #fff; -moz-border-right-colors: #999 #ddd; -moz-border-top-colors: #77f #fff; } button:focus:active, inputtype="reset":hover:active, inputtype="button":hover:active, inputtype="submit":hover:active, select:not(multiple):hover:active { border: 2px solid !important; -moz-border-top-colors: #999 #ddd !important; -moz-border-right-colors: #777 #fff !important; -moz-border-left-colors: #999 #ddd !important; -moz-border-bottom-colors: #777 #fff !important; } select > inputtype="button" { border-top: none !important; border-left: 1px solid #ddd !important; border-right: none !important; border-bottom: none !important; background-image: none !important; background-color: transparent !important; } / * inputtype="text":focus, inputtype="password":focus, input:not(type):focus, selectmultiple:focus { -moz-border-top-colors: -moz-mac-focusring -moz-mac-focusring !important; -moz-border-left-colors: -moz-mac-focusring -moz-mac-focusring !important; -moz-border-right-colors: -moz-mac-focusring -moz-mac-focusring !important; -moz-border-bottom-colors: -moz-mac-focusring -moz-mac-focusring !important; -moz-border-radius: 2mm; } textarea:focus { -moz-border-radius: 3mm; } * / textarea, selectmultiple { border: 2px solid !important; -moz-border-bottom-colors: transparent #999 !important; -moz-border-left-colors: transparent #999 !important; -moz-border-right-colors: transparent #999 !important; -moz-border-top-colors: transparent #777 !important; } */ # # Send Mail Directly from Perl # my $LOGTIME = ... my @emails = qw(brother@elwood.com sister@elwood.com); my $LOGFILE = "/home/admin/logs/check_jvm/check_jvm_$LOGTIME.log"; open(LOG,"$LOGFILE") or die; { undef $/; $log = <LOG>; } close LOG; if (open(SENDMAIL, "|/usr/lib/sendmail -oi -t -odq")) { print SENDMAIL "From: PROD\@elwood.com\n" . "To: " . join(" ", @emails) . "\n" . "Subject: Web Server Issue\n" . "$log\n"; close(SENDMAIL); } # # Comm.pl # #Here's how to use Comm.pl, require "Comm.pl" &Comm'init(1.8); &set_traps; $program=&open_proc("some program"); ($success, $matched, $before_match, $after_match ) = &expect ( $program, 10(time out in sec), 'what you are expecting'); die "Time out\n" unless ($success); print $program "What you want to send to the program\n";
IPC::Open3 woes
Search and replace in multple MS Word documents
Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2014-09-19 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (138 votes), past polls