Record current time





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 Next »
6
Date Submitted Thu. Aug. 10th, 2006 1:14 PM
Revision 1
Beginner sio2man
Tags CGI | Perl
Comments 1 comments
Prints the user's IP address and localtime on a web page.
9
Date Submitted Thu. Aug. 10th, 2006 2:02 PM
Revision 1
Beginner sio2man
Tags Perl | Threads
Comments 0 comments
This is a little example of how to use threads in Perl. It creates three threads and runs them... That's it...
7
Date Submitted Mon. Nov. 14th, 2005 7:05 PM
Revision 1
Helper ses5909
Tags File | Perl | Size
Comments 1 comments
Get a FileSize
7
Date Submitted Mon. Nov. 6th, 2006 1:48 PM
Revision 1
Helper RobHarrigan
Tags "first | "title | capitalize | case" | letter" | Perl
Comments 3 comments
Function to capitalize the first letter in every word in a string, but only if the entire string is in ALL CAPS.

Example:
"I LIKE TO SCREAM" becomes "I Like To Scream"
"I LIKE to RUN" remains "I LIKE to RUN".
5
Date Submitted Fri. Nov. 3rd, 2006 12:07 PM
Revision 1
Helper jarfil
Tags "Command Line" | Perl
Comments 2 comments
I've found it kind of complicated to strip newline chars from a file with just the commandline. This tiny piece of code does just that.

I've found it especially useful when extracting tabulated data from a grabbed site where each cell is on a different html line. This way I can pre-filter the html, remove the newlines, and insert them again at register boundaries (row end in this case), so that with just a couple more replacement from within a regex enabled text editor I can copy&paste it directly to a database.
5
Date Submitted Thu. Feb. 16th, 2006 8:37 AM
Revision 1
Helper digitaljunkie
Tags Perl
Comments 2 comments
I needed a quick way to make a Street Address and City proper case.
Lingua::EN::NameCase works best for peoples names, but it does not work well for Addresses. This is not intended by any means to be complete, but is quick and dirty.

Plus, there are not many Perl snippets here. So, I thought I would start simple :-)
7
Date Submitted Tue. Mar. 7th, 2006 4:34 PM
Revision 1
Helper digitaljunkie
Tags Clipboard | Perl | Screenshot | Win32::API
Comments 1 comments
This requires Win32::API, and Win32::Clipboard.
Only works on Win32 Platforms. Only really tested on Win2000, and WinXP.

Not meant to be an be all, end all, but it's a start.

Have fun!
9
Date Submitted Tue. Mar. 7th, 2006 4:47 PM
Revision 1
Helper digitaljunkie
Tags compress | gunzip | gzip | Perl
Comments 0 comments
The docs for Compress::Zlib for perl are very complex. But, the most simple use of the Module is not too bad. I've waded through the perdoc so you don't have to.

Gunzip.pl is here. I will let you know when I have Gzip.pl done.

You can do something more interesting with "success" variable.
8
Date Submitted Wed. Mar. 29th, 2006 10:55 AM
Revision 1
Helper digitaljunkie
Tags File | MD5 | Perl
Comments 0 comments
Is this file the same as that file? The files may or may not be binary. We could compare the modify dates, or the sizes. But, those are not very accurate to know if a file has really changed.

Introducing MD5 Checksum. We can feed the files into Digest::MD5 in binary mode.

This is a great way to do Incremental Backups.

This is also an easy way to verify checksums when downloading files from the internet which list their MD5 Checksums.

You'll need the Digest::MD5 Perl Module.
7
Date Submitted Wed. Mar. 29th, 2006 11:31 AM
Revision 1
Helper digitaljunkie
Tags compress | File | gzip | Perl
Comments 0 comments
Need to GZip a file using Perl?

Use Compress::Zlib.

This is a simple perl script which creates a GZip file.
« Previous 1 2 Next »