Re: Reading hash arrays in the order it was written

2008-11-20 Thread Cowboy
Hi,   The module "Tie::Hash" might be one of the solutions that you are looking for.   Regards, G. Indragoby. --- On Wed, 19/11/08, Fish, David <[EMAIL PROTECTED]> wrote: From: Fish, David <[EMAIL PROTECTED]> Subject: Reading hash arrays in the order it was written To: activeperl@listserv.actives

Re: Redefining Constants

2008-03-11 Thread Cowboy
Hi, There are few things are missing; please check with the following code: package myModule; use strict; use warnings; use constant constantA => 'bar'; sub import { shift; #The first argument is class name; so eliminate it my %params = @_; if (defined($params{'constantA'})) { # Thi

Re: URL Trimming s{} regex

2008-03-11 Thread Cowboy
Hi, I think the following code would be better one. while ($url = ) { chomp($url); $url =~ /^(?:http:\/\/)?([^\/]+)/; print $1."\n"; } __END__ http://www.wilbert.net www.worful.com/after-text.htm http://www.winston.com/argle.htm www.windoze.net Thanks and Regards, Indra