Perl Coding School

                          

                   

Note: The archives category content is an automatically generated focus channel and does not neccessarily reflect the opinions of this blog. No responsibility is taken for the external links presented here, follow at your own discretion.
The archives content is never scraped from sites - but an abstract obtained from search engines.

Category: 'perl-coding-training'

Read File To Var

Thursday, December 6th, 2007
Problem Solution Example Reference Recommended


You want to read a file into a Perl variable.



Date Function Calcualate Last Sunday

Wednesday, December 5th, 2007
Problem Solution Example Reference Recommended


Showing the date last Sunday, using Perl.



Converting String Scalar Number

Wednesday, December 5th, 2007
Problem Solution Example Reference Recommended


Converting a string scalar into a number.



Convert String Array

Wednesday, December 5th, 2007
Problem Solution Example Reference Recommended


Converting a string into an array



Convert String Hash

Wednesday, December 5th, 2007
Problem Solution Example Reference Recommended


Need to convert a string to a hash in Perl.



Word Counting

Wednesday, December 5th, 2007
Problem Solution Example Reference Recommended


You want to count the words in a file, using Perl.



Number Output Lines

Wednesday, December 5th, 2007
Problem Solution Example Reference Recommended


You want to number each line of output.



Perl Doc Usage

Wednesday, December 5th, 2007
Problem Solution Example Reference Recommended


You need help on a specific Perl function or module. Or just a general question.



Importing AWK SED

Tuesday, December 4th, 2007
Problem Solution Example Reference Recommended


You have some way cool awk or sed scripts, but you want to use Perl.



mysql API socket connection

Tuesday, December 4th, 2007
Problem Solution Example Reference Recommended


Sometimes you need to connect to mysql server with a UNIX socket, rather than a Port.

Generally this is when running multiple versions, on a box when you do not want to
or cannot connect to multiple ports.



File handling - UNIX stat

Wednesday, June 6th, 2007
Problem Solution Example Reference Recommended


You want to view seconds since last change or use Perl to process a number of files.

Or maybe you just want a programmatic way to deal with file details, using something similar to the UNIX stat C routine.



Check specific number arguments

Wednesday, June 6th, 2007
Problem Solution Example Reference Recommended


You want to check a specific number of arguments, have been supplied to your Perl script.



Perl in file pattern substitution

Tuesday, June 5th, 2007
Problem Solution Example Reference Recommended


You want to substitute a pattern in a number of files, making backups and modifying in place on the fly.

And you can do this in Perl - with a one liner! :)



Date handling in Perl

Tuesday, June 5th, 2007
Problem Solution Example Reference Recommended


You want to convert epoch into readable date and time.

Maybe you have a log file, which is pumping out lines prefixed with the epoch?



Column handling in Perl

Tuesday, June 5th, 2007
Problem Solution Example Reference Recommended


During my first encounters with Perl many years ago, I asked how can I get a specific column.

It was so easy in AWK! ;)



Obtain epoch time and calculate date yesterday

Sunday, June 3rd, 2007
Problem Solution Example Reference Recommended


You want to capture the current epoch. Maybe to use in a log file, or as a filename.

Or maybe you want to calculate the date yesterday.



Perl TimeOut

Monday, May 28th, 2007
Problem Solution Example Reference Recommended


You have a script which runs too long and you want to time it out, after a given number
of seconds.



Perl SHA digest

Saturday, May 26th, 2007
Problem Solution Example Reference Recommended


You want to generate a SHA digest for a given string.