Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

matze77's scratchpad

by matze77 (Friar)
on Nov 26, 2008 at 21:23 UTC ( #726233=scratchpad: print w/replies, xml ) Need Help??

Variable Scopes: my only "local" not assigned outside the "loop" e.g. global: use vars qw($var1 $var2); while (){ $var1 = 0 }

some things i am currently on:, maybe not of interest for you ;-)
Top: Find a solution in (active perl, e.g.,platform: Win32) to send warning mails logs to admins when diskspace is nearing x% free only ... selective warnings monitor text files
file date

Answer: How do I determine file creation or last-access date?

Multi-directory Change Reporter
Re: Modern best practices for multilingual regexp alphabetical character matching?
File parsing File parsing Mail: Reaping messages by Message-ID
99 Programming Problems
sleep, nice, performance issues
breathe - beyond 'nice'

starting perl Re^2: #!/usr/bin/perl vs. -*- perl -*- Certification In PERL

Other Users, their experiences:
From Initiate to Monk
1st Monasterians
kyle's scratchpad The FAQ
PerlMonks FAQ

Where is paco:
How do I recursively process files through directories stolen from Tanktalus
Writeup Formatting Tips
something to remind me of:
use strict;
perl -w
perldoc perdoc -q
perldoc perlintro perldoc perltoc perldoc perlfaq[1-x] quote delimiter(s), \, $, and @,

RFC: How to survive your first few months of Perl
.vimrc for perl programmers Beginners Guides:
How (Not) To Ask A Question

videos: Download video from popular videoservices

Perl starter with big problem. PM, Bot:

Automatically add all defined functions to your @EXPORT
Plugins etc.:

Game related:
chatbox, fullscreen linking to
cpan Modules:
Outlining levels of Perl People http & co: linuxer: perlop has a section about interpolation linuxer: "Quote and Quote-like Operators" array simple print:
#!/usr/bin/perl @words = ("one","two","three","four","five"); foreach $elem (@words){ print "$elem\n"; }
Mathematical standard "problems":
Odd or even numbers:
#!/usr/bin/perl -w #We use warnings #test if a number is odd or even using modulus: for ($i = -3; $i <=11; $i++) { $mod = $i %2; if ($mod == 0){ printf "$i is even, modulus is $mod \n"; } if ($mod == 1){ printf "$i is odd, modulus is $mod \n"; } }
CleanPath "$?" Looking for a "learning and restricting" Sandbox ... (Both: prevent harmful programming failures and "Test Code" ...) embedded spaces in paths and system() File ueberschreiben:
#!/usr/bin/perl #use 5.006; #use strict; use warnings; open (IN, "+</home/victim/perl/mifile.txt"); @file = <IN>; seek IN,0,0; foreach $file (@file){ $file =~ s/muster1/\#\ muster2/i; #$file =~ s/muster1/\#\ muster2/ig; print IN $file; } close IN; #l15 s/ersetze/mit/ig #l15 bei \ muster2 wird zusätzliche ein # und ein leerzeichen eingefüg +t #l15 s /i= case insensitive g = global alle #l18 filehandle schliessen #ohne g nicht global wird nur 1x ausgeführt # rofl: print map {chr (((hex A0)/2+3)+$_)}(0,-11,-10,1) grep: [id://811976] hashes: [id://563314]
html-commands: strike bold

Log In?

What's my password?
Create A New User
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2018-06-23 07:17 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (125 votes). Check out past polls.