Where to hire good perlish Perl tutors?

2004-10-19 Thread perl perl
Can anyone recommend a site where I can hire a competent Perl Tutor? I wish this info is readily available on perl.com but it isn't. And searches on google and craigslist is pretty disappointing. Anyway, I don't want to spam the board so I'd appreciate it if you could email me

Perl versus Expect(tcl) : Specific Example

2005-02-12 Thread perl perl
Hi, I'd like to narrow the previous Expect(tcl) question so that an answer can be extracted: Perl vs Expect(tcl) question again. Here is a specific Expect example: I have a release engineering build script that performs the following: Launch masterbuild.tcl (expect script) from WinNT s

Re: Perl versus Expect(tcl) : Specific Example

2005-02-13 Thread perl perl
Excellent info coming in, so far. If its true that we have to use two versions of Perl Expect.PM (ActiveState) and Perl Expect.PM (Unix)... then wouldn't that pose double script maintenance issues? My Expect(tcl) script is simplified and centralized to one file. Its capable of switching

RE: I just don't get it....

2001-06-08 Thread Perl
I'm pretty much a newbie and should be reading more than contributing, but one of my professors insisted that we troubleshoot all of our classroom assignments by running our Perl programs from the command line. I've continued this practice in my post-classroom life. Keith

Re: Retaining punctuation

2001-06-17 Thread perl
you can just do this before you spell check. { s/./ ./g; # Would make Test. Test . s/,/ ,/g; # etc. for other punctuation marks. spellcheck s/ ././g; # Make Test . back to Test. after spell check

Re: Perl question

2001-06-18 Thread perl
processes all the garbage > above and below the actual working area of the file. > > I would appreciate any help in resolving this issue as well as any > comments on better coding practices. > > Regards, > > Jack > > > #!/usr/bin/perl > # > # cur2sql.pl &

Re: getting memory info from system

2001-06-19 Thread perl
yeah just type : 'free' Ryan On Tue, 19 Jun 2001, Chris Hedemark wrote: > Howdy, > > I'm tearing through my O'Reilly books and the CPAN search trying to find a > module or built-in function call that will let me get statistics back from > the system regarding memory. I'm trying to find: > > 1)

Re: variable losing it's value

2001-06-19 Thread perl
When you do : foreach $line (<>){ that will print the last line in <> rename $line in the foreach statement to something different, RYan On Tue, 19 Jun 2001, Bob Mangold wrote: > I may have a bug somewhere in my code, but I can't find it. Before I look again > though please answer this for

file size

2001-06-21 Thread perl
Hi, I would like to know if with a perl script you can get the size of a file ? I need to get all the size of 250 files on 250 computers ... thanx

RE: HTTP::Status status_message($rc) & LWP::Simple

2001-06-22 Thread perl
To get the status message from a http request from lwp: my $res = $ua->request($req); my $errorCode=$res->status_line Economic perl programming and perl debugging http://www.fluxcent

Logo for learn.perl.org

2001-06-24 Thread perl
I propoused thi logo for learn.perl.orgl, if you liked please tell me so.And vote on this list. http://perl.fluxcenter.com/images/learn_perl4.gif The logo is the same size as the 'Download Perl' Button, is very fast. And mathes desing of learn.perl.org The Brown and green are are to

I need some help ...

2001-06-25 Thread perl
I want to do this : I have a file where there are 256 servers names, one server name per line. I want to read all lines to take the names of all servers to check the size of some files ... I tried this but it's not working like I want .. : $serveur="c:\\perl\\bin\\liste.txt&qu

Re: I need some help ...

2001-06-25 Thread perl
En réponse à Aaron Craig <[EMAIL PROTECTED]>: > I would do something like this: > > use strict; # very important, and saves a lot of headache! > > open (SERV, "c:\\perl\\bin\\liste.txt") || die "Could not open > liste.txt: > $!"; # added

compare the size of some files ...

2001-06-27 Thread perl
I want to do this : - get the size of some files with stat - compare these sizes with some variables - copy the "good" files if the size doesn't match ...

need some help ...

2001-07-02 Thread perl
hi, I want to do this : i have some servers where i want to check if some files exists and the user must put the all path with the name of the file ... use strict; #that's the file where my servers are ... open (LISTESERVEUR, "c:\\perl\\presence\\listeserveur.txt") || die &

remplace ...

2001-07-09 Thread perl
Hi, I want to remplace all the word "html" in "php" in some web pages ... I tried this but nothing is happening : open (TRANS, "c:\\test\\test.txt"); @transformation=; foreach $ligne (@transformation) { chomp($ligne); $transform=$ligne; $transform=~s/html/php/g; }; close (TRANS);

Summarising tables

2001-12-13 Thread Perl
Hi all, Need a little help on summarising 2 different tables into 1, based on a particular field. The 2 tables (they are actually content from a log file) look like the follow : Table #1 1006788900 198 36 1006788600 29 35 1006788300 18 75 1006788000 19 65 1006787700 42 37 10067874

Re: Summarising tables - further question

2001-12-15 Thread Perl
Hi all, Thanks for those who replied to my posting appreciate all the help given. :) Based on the code written by John (thanks a lot), I would like to ask a further question : John's code ==> #!/usr/bin/perl -w us

Explanation on dereference

2001-12-18 Thread Perl
Hi guys, I encountered this dereference problem on hash-of-lists tables. Although I have managed to solve the problem thru trial and error, I need someone to explain to me what was wrong exactly. I tried searching the web for some info but couldn't find any. The problem started when I tried to

[Fwd: ezmlm response]

2002-01-25 Thread perl
Hi ,,, this my first time i write to you :) i have the uncluder script $file = $ENV{'QUERY_STRING'}; print "Content-type: text/html\n\n"; if($file eq "") { print "document.writeln(' Includer Error: No File Specified. ');\n"; print "document.writeln('Script by SmartCGIs.com <%5C%22http://www.sm

Match and split on array help with output

2009-04-14 Thread perl
-f3 I get the desired output, to a point, but I'd like to do it all in perl Thanks for your time. Alan. #!/usr/bin/perl # # # Build Initial list and put into array. @serverlist = `/usr/bin/wget -q -O - http://www.anyserver.com`; for ($index = 0; $index <= $#serverlist; $index++) {

map foreach loop into array

2010-03-21 Thread perl
i need to get that data into a global array } honestly i am not that good at perl i have been exploring perl thanks you -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

How to Decode UDP packets got from libpcap using Net::Pcap

2010-05-05 Thread perl
> I have used libpcap to capture data using Net::Pcap module ... and now > ... i have been stuck with decoding... here is the code that i have > used http://cpansearch.perl.org/src/SAPER/Net-Pcap-0.16/eg/pcapdump > #!/usr/bin/perl use strict; use Data::Hexdumper; use File::Basename;

XML::XPath got some error creating a new parsing

2010-06-03 Thread perl
This is normally the basic when i added a xml file to the code Code :: /use XML::XPath; use XML::XPath::XMLParser; use Data::Dumper; # create an object to parse the file and field XPath queries my $xpath = XML::XPath->new( filename => "test.xml" ); print Dumper ($xpath) ;/ OutPut :: /$VAR

XML::LibXML::Reader source specification error

2010-06-12 Thread perl
I tried to use LibXML .. when i never to the correct libXML read file ... when i tried to use the LWP download which is an XML .. how to use it please help me ... /use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $response = $ua->get("http://www.perlmonks.org/?displaytype=xml;node_id=3989";);

how to get XML::LibXML perfect xpath query ?

2010-06-12 Thread perl
i have tried to use the LibXML modules to xpath a document but its getting complicated .. i have seen this example over forum here . use XML::LibXML ; use strict; use warnings; { my $xml = <<'XML'; Hello world! XML my $parser = XML::LibXML->new; my $doc

cgi sqlite error not able to write data in database

2010-07-23 Thread perl
hi, it got some error while adding data into sqlite through Perl script on Apache ... script can able to read the file but not able to write .. I have set the permissions of sqlite file to 666 .. when i ran the script from local user its working fine .. its able to write the data into db when i

Re: cgi sqlite error not able to write data in database

2010-07-23 Thread perl
On 07/24/2010 08:53 AM, Owen wrote: > >> hi, >> it got some error while adding data into sqlite through Perl script on >> Apache ... script can able to read the file but not able to write .. I >> have set the permissions of sqlite file to 666 .. >> >> wh

Re: cgi sqlite error not able to write data in database

2010-07-24 Thread perl
On 07/24/2010 10:48 AM, Owen wrote: > >> On 07/24/2010 08:53 AM, Owen wrote: >> >>> >>>> hi, >>>> it got some error while adding data into sqlite through Perl script >>>> on >>>> Apache ... script can

Email Purge

2009-02-24 Thread perl
Cheers and thanks in advance for you help. I have a routine intended to purge duplicate emails from a list. The code below is not working. I remember seeing something like... foreach $email(@emails, @emails2)) { etc ... but I'm lost. Any help is appreciated. sub purge { open (LIST, "$list") or erro

Apache::Session question

2004-03-25 Thread Perl
h }; return;#(\%session); } 1; #!/usr/bin/perl -w # # Program: # Author: Babale Fongo # Date:

Image editing/Creating modules

2004-05-17 Thread perl
can someone give a name of any image (JPG or GIF) editing / creating module, which allow to create images to display on web pages on the fly by CGI scripts. Rakhitha M. Karunarathne Trainee Software Developer, IFS - R & D International, 501,Galle Road ,Cololmbo-6, SRI LANKA. Tel +94 (011)-2-364-

Sorting HTML tables

2004-08-04 Thread Perl
I wrote some code to identify and print HTML tables below: use strict; my @table; my $logfile; my $counter; my $inc; my @array; die "You must enter an argument. \n" if $#ARGV <0; $logfile = chomp ($ARGV); foreach my $line(<>){ if ($line =~ /(TABLE)(.+)/) { $inc++;

Regex to match valid host or dns names

2004-10-13 Thread perl
Hi, How do I best test for a valid host name? My script will read from a file which contains IP addresses and/or dns name, so I'm trying to sort out valid IP addresses or host name (using regex). For some reason, my regex fails to match host names with one or more dash (-). IN the example below,

Re: RE: Regex to match valid host or dns names

2004-10-14 Thread perl
Your regex did not allow (w2k-server-proxy2) a valid dns name. I now see how complex it is to match valid ips or dns names. The more I try to modify the regex to perfection, the more I see hopholes. So I think it is not worthwhile spending lot of time on this regex. My script does more than patte

module installation

2004-11-16 Thread perl
Hi, I installed few perl module locally and I try to install another one which depends on the previously installed ones (locally) but I get the warning that these modules can not be loaded example: billmax:~/src/perl/XML-DOM-1.43$ perl Makefile.PL PREFIX=~/usr/local/lib/perl5 Checking if your

Uninitialized value in unpack

2004-12-23 Thread perl
Can anyone point out what is uninitialized in line 162? my @resolved = (); foreach (@dns){ my $ip = gethostbyname($_); my ($a,$b,$c,$d); my $x = join (".", (unpack('C4',$ip ))); # line 162 $x ||= ""; push (@resolved, join(" => ", $_,$x)); } Thanks -- To unsubscr

Compare file modification time

2005-02-11 Thread perl
How do I best compare mtime of several files. I have a script for making daily backups into a given directory. Now I want to modify it to delete old backups if the total exceed cetain number. The idea was to compare the mtime of all file to figure out old files to delete, but somehow I think it

compare file modification time

2005-02-14 Thread perl
#!/usr/bin/perl -w use strict; #use diagnostics; my $dir = "testdir"; opendir (DH, "$dir") || die "Could not open $dir: $!\n"; my @files; my $keep = 7; while (defined(my $file = readdir(DH))){ next if $file =~ /^\.+$/; push (@files, $file); } # Skip the

Regex against a scalar

2005-03-23 Thread Perl
Hi. I would like to search a scalar variable and have the output to another scalar. For example: $test = "This is some test data"; I want another scalar, $regex to hold the output of a regular expression lookup against $test. So something like this: $regex =~ /test/ running against $test. Is

can any one tell why isn't this working on HTML::Tree ??

2011-01-01 Thread perl
use strict; use warnings; use YAML; use HTML::Tree; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $response = $ua->get('http://www.raaga.com/channels/hindi/moviedetail.asp?mid=H002927'); my $content1 = $response->content; my $tree = HTML::Tree->new(); $tree->parse($content1); my $article = $

Maximum file descriptors on Solaris

2002-03-26 Thread perl
I know that under Solaris 2.6 that a process couldn't hold more than 256 file descriptors, but that restriction was lifted in Solaris 7 and Solaris 8. Using ulimit -n 1024 and the pfiles command, I can see that the process running this particular Perl script in question has a 1024 limit bu

Re: How to thread in Perl?

2002-03-26 Thread perl
Is there a limit to the number of children in Perl? "Ahmed Moustafa" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Tagore Smith wrote: > > > Ahmed Moustafa wrote: > > > > > >>So, how can a new diff

Retrieving stock data from the web

2007-12-05 Thread Perl
Hi All. I want to download historical stock financial data (EPS, growth, sales revenue etc.) from the web. My intention is to populate a MYSQL database with these values and then perform a series of calculations against the database for my personal investing. A sample of the data I want to ret

Re: local and auto flush

2018-05-19 Thread perl
Many thanks for the very helpful comments from Andrew and Andy. For the first time, I have a clear idea of what local and auto flushing are doing for me. I know I’d get educated here! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.or

Re: difficulty with matching

2018-06-02 Thread perl
ent_id}; # Impose lower case >>$student_id =~ s/\s//xmsg; # Remove whitespace >> >>$student_id =~ >>m{ >>\A([a-z]+) # match and capture leading alphabetics >>(-) # hyphen to separate surname from student numbe

Re: interpolation without double quotes

2018-07-05 Thread perl
Many thanks to Shlomi and Uri: as always, you’ve greatly boosted my understanding of Perl! — Rick > On Jul 4, 2018, at 9:35 AM, Shlomi Fish wrote: > > Hi Rick, > > On Wed, 4 Jul 2018 09:16:19 -0500 > Rick T wrote: > >> The following line works, even though I

Re: slurp error

2018-07-29 Thread perl
fically didn't want one. Smacks of cargo cult but I'd never > argue with him. > > On Fri, Jul 27, 2018 at 1:37 PM, Rick T <mailto:p...@reason.net>> wrote: > I tried to implement some advice about slurping that I read on this mailing > list (using local) but canno

Re: reading form values from POST

2018-09-03 Thread perl
ng to wean myself from CGI.pm, an easy task for most of you, but I >> am a beginner. The code below works, but that does not mean it always will or >> that it cannot be improved. I found the main part of this in CGI Programming >> with Perl, which is 18 years old, and I’ve given up hop

Re: data structure for Template Toolkit

2018-10-29 Thread perl
); > > If only there were 'strict' and 'warnings' for Template! :-) > > Andrew > > On Sun, Oct 28, 2018 at 8:52 PM Rick T <mailto:p...@reason.net>> wrote: > As a novice in perl I realize that it’s a bit presumptuous for me to attempt > references and

Re: data structure for Template Toolkit

2018-10-30 Thread perl
tunately I’m beginning to get the hang of Template Toolkit, and >> I may need it for more complex situations that come up. Switching from >> HTML::template this year was a challenge, and I had to rewrite a lot of my >> perl to go with it. I know that most perl people are good at u

Re: data structure for Template Toolkit

2018-10-30 Thread perl
ty reading logs to figure out > what is wrong, and what to do about it, but for well maintained > packages in a Unix-like environment that is rare in my > experience.. > > You can read about cpanm and how to install it from the Git repo > readme: > https://github.com/miyagawa/cpanm

Pass a value to Perl script

2005-07-12 Thread Perl
I have this perl script which is taking value from an external appliaction and then after processing it is passing back a value to same application. But I was not able to figure out how can I define the variablemy $path (which is taking value from external app). what should be the syntex. Can

Re: Pass a value to Perl script

2005-07-13 Thread Perl
Dhanashri/ Chris Yes!! exactly that is what I am trying to do. I am sorry for not making it clear before. here is the true picture. I have an APP which can run a perl script but just before running the script I have a variable in that app which is holding a value let say "c:\documents\te

Help Please!!! External APP passing value to Perl

2005-07-22 Thread Perl
Hello Listners, I am totally novice in perland I need help with that script. what can be the syntex of assigning a variable (my $path) in perl which is taking value (for example c:\documents\script.txt) from an expternal APP. The script will actually parse the my$path value (C:\documents

Re: Help Please!!! External APP passing value to Perl- Problem Resolved

2005-07-22 Thread Perl
Jeff, Thanks a lot for your reply. Acutally external APP was passing value to command prompt so the first option did work. "Jeff 'japhy' Pinyan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Jul 22, Perl said: > > > what can be the sy

Please Help!!! Newbie question

2005-08-31 Thread Perl
I am new to perl so I need some help from the list with this script. It takes a value from command line and then returns afters processing. For example, If value is "c:\projects\test 2005.txt" the script will returns it as "test" (actually omitts any space in the directory o

Please Help!!! Newbie Question

2005-09-01 Thread Perl
ame of file. Here is the script #!/usr/bin/perl # file: basename.pl use strict; use File::Basename; my $path = $ARGV[0]; my $base = basename($path); my $dir = dirname($path); print STDOUT $base; Any help/suggestion will be appreicated. Thanks a lot. -- To unsubscribe, e-mail: [

Retrieve lsit of computers using net::ldap

2006-03-02 Thread perl
Hi, I'm trying to retrieve a list of computer names using net::ldap, but my script returns no values. It's my first time working with the protocol, so I can't figure out why it doesn't work. I checked the docs several times, but the ldap filter usage is still not clear. Can anyone point out h

Re: Automatically scheduling the execution of a sub-routine

2006-04-04 Thread perl
On Tue, 2006-04-04 at 12:52 +1000, James Turnbull wrote: > James Turnbull wrote: > > Hi > > > > Anyone know of a way to create a loop (or something similar) that > > automatically schedules the execution of a sub-routine periodically > > from within a program, for example execute check() every 60

only one of two hash keys

2006-04-04 Thread perl
Is there a nice clean perl way to test to see if only one key of a hash has data? %some_hash = ( key1 => 1, key2 => 2 ); should fail the test %some_hash = ( key2 => 2 ); should pass the test %some_hash = ( key1 => 1 ); should pass the test Thank you -- To unsubscribe, e-mail: [EMA

Re: only one of two hash keys

2006-04-04 Thread perl
On Wed, 2006-04-05 at 09:35 +0800, Jeff Pang wrote: > Hello, > > [EMAIL PROTECTED] ~/app]$ perl -le '%some_hash=(aa=>'bb');scalar keys > %some_hash == 1 ? print "true" : print "false"' > true > [EMAIL PROTECTED] ~/app]$ perl -le &

How to redefine an autoload sub.

2006-04-13 Thread perl
#!/usr/local/bin/perl write_function1("first"); print auto_function(), "\n"; # This will print: # auto_function first write_function1("second"); # How would I undefine the autoloaded version of auto_function? print auto_function(), "\n"; # This will pr

Re: hosting suggestion?

2023-07-03 Thread perl
e, but pretty good. > > > > Mike > > > On 7/1/23 13:49, Rick T wrote: >> My web hosting company is closing business, and I less than two weeks to >> move my five sites to another host. All of these use perl. If you have >> experience with a host that suppo

Re: configuring Net::SMTP

2023-07-08 Thread perl
ne or both likely arrived at >> webmas...@hostgator.com <mailto:webmas...@hostgator.com>.) >> >> I am not trained in computer tech; I’m just a 78 year old high school >> teacher who bought a few books on perl, so I don’t really understand >> how to fill in the many

Re: configuring Net::SMTP

2023-07-15 Thread perl
ot; . $smtp->message(); >> $smtp->data() or confess "SMTP data: " . >> $smtp->message(); >> $smtp->datasend($theBody) or confess "SMTP datasend: " . >> $smtp->message(); >> $smtp->dataend()

how do I pass null arguement?

2003-10-09 Thread perl
How do I pass a null variable as an argument? Sometime I may want a wrapper sub as below: Example, ... sub procName { my $fname = $_[0]; my $lname = $_[1]]; } my procByLastName{ mySubA(null, "doe"); } ... This is the error message: Bareword "null" not allowed while "strict subs" in use thanks

Re: how do I pass null arguement?

2003-10-09 Thread perl
thanks. it works! -rkl > Try 'undef'. > > eg. my procByLastName{ mySubA(undef, "doe"); } > > On Fri, 2003-10-10 at 16:39, [EMAIL PROTECTED] wrote: >> How do I pass a null variable as an argument? Sometime I may want a >> wrapper sub as below: >> >> Example, >> ... >> sub procName >> { my $fname =

regex require a period

2003-10-09 Thread perl
here's the rules: starts with alphanumeric 4 chars long require one period /^[a-zA-Z][\w\-\.]{3,}$/ I think my regex is not doing the required period. thanks, -rkl - eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTE

Re: regex require a period

2003-10-10 Thread perl
> /^[a-zA-Z][\w\-\.]{3,}$/ && /\./ Matches more than 1 period. I MUST have 1 and ONLY 1 period. Also, can I fit it on one line? I couldn't doit. sub isValidDomain { return shift =~ /^[a-zA-Z0-9][\w\-\.]{3,}$/ } --- > How about something like: > > /^[a-zA-Z][\w\-\.]{3,}$/ && /\./ > > On Fri, 200

Re: regex require a period

2003-10-10 Thread perl
I couldn't get it to work. Will the sub run as is? Is the :alpha: suppose to be there or replace it? > On Thu, Oct 09, 2003 at 11:58:31PM -0700, [EMAIL PROTECTED] wrote: >> here's the rules: >> starts with alphanumeric >> 4 chars long >> require one period >> >> /^[a-zA-Z][\w\-\.]{3,}$/ > > I wou

Re: regex require a period

2003-10-10 Thread perl
This is not working as I expected: if(validate('abc.com')) { print "true"; } else { print "false"; } -rkl > On Fri, Oct 10, 2003 at 12:49:51AM -0700, [EMAIL PROTECTED] wrote: >> I couldn't get it to work. > > Whoops --> > > sub validate { > local $_ = shift; > return( length == 4 and >

RE: how do I pass null arguement?

2003-10-10 Thread perl
Good info. thanks, -rkl > Hi, > > [EMAIL PROTECTED] wrote: >> How do I pass a null variable as an argument? Sometime I may want a >> wrapper sub as below: >> >> Example, >> ... >> sub procName >> { my $fname = $_[0]; >> my $lname = $_[1]]; >> } > > Alternatively, you could write either > > my

Re: regex require a period

2003-10-10 Thread perl
> /^[a-zA-Z][\w\-\.]{3,}$/ && /\./ The above matches more than 1 period. I MUST have 1 and ONLY 1 period. Also, can I fit it on one line? this doesn't work either sub isValidDomain { return shift =~ /^[a-zA-Z0-9][\w\-\.]{3,}$/ } thanks --- > How about something like: > > /^[a-zA-Z][\w\-\.]

Declaring sub at top or bottom matter?

2003-10-10 Thread perl
Does declaring at the top or the bottom matter? thanks - eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regex require a period

2003-10-10 Thread perl
Ok - I got it to work by changing the line to length >= 3 If I could push the rule a little further, a new rule added is that an alpha char a-Z MUST be after the period. thanks > On Fri, Oct 10, 2003 at 03:11:52PM -0700, [EMAIL PROTECTED] wrote: >> This is not working as I expected: >> >> if(v

Re: regex require a period

2003-10-10 Thread perl
rules: starts with alphanumeric 3 chars long require ONLY one period require alpha after the period /^[a-zA-Z0-9][\w-].[a-zA-z]/ #but now working sub validate { local $_ = shift; return( length >= 3 and tr/.// == 1 and /^[[:alpha:]]/ and /[a-zA-Z0-9].[a-

Re: regex require a period

2003-10-10 Thread perl
The regex below is working for after the period. The part in fron is not working. It is requiring atleast 2 chars before the period which is not my rule. the rule for the front part: start with [a-zA-Z0-9] chars following is [\w-] BUT IS OPTIONAL /^[a-zA-Z0-9][\w-]\.[a-zA-z]+$/ I think the regex

Re: regex require a period

2003-10-10 Thread perl
The regex below is working for after the period. The part in fron is not working. It is requiring atleast 2 chars before the period which is not my rule. the rule for the front part: start with [a-zA-Z0-9] chars following is [\w-] BUT IS OPTIONAL /^[a-zA-Z0-9][\w-]\.[a-zA-z]+$/ I think the regex

Re: regex require a period

2003-10-10 Thread perl
So, would this be it for the optional? /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/ thanks > --On Friday, October 10, 2003 17:45 -0700 "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: > >> start with [a-zA-Z0-9] >> chars following is [\w-] BUT IS OPTIONAL >> >> /^[a-zA-Z0-9][\w-]\.[a-zA-z]+$/ >> >> I think

Re: regex require a period

2003-10-10 Thread perl
Great! Final verification question. Atleast for now :) Do I need to use delimiter for a hyphen? /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/ or /^[a-zA-Z0-9][\w\-]*\.[a-zA-z]+$/ thanks > --On Friday, October 10, 2003 18:21 -0700 "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: > >> So, would this be it for

behavior of semicolon on return line

2003-10-10 Thread perl
Does the semicolon behave any differently for a return test statement? Example, sub validate { return shift =~ /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/ } or sub validate { return shift =~ /^[a-zA-Z0-9][\w-]*\.[a-zA-z]+$/; } thanks - eMail solutions by http://

RE: working on time

2003-10-11 Thread perl
own the > road: > > #!/usr/bin/perl -w > > use Date::Manip; > > my ($day, $mnth, $yr); > my $date = DateCalc("today","- 1day"); > ($yr, $mnth, $day) = ($date =~ /(\d\d\d\d)(\d\d)(\d\d)/); > print "Yesterday was $mnth/$day/$yr\n"; > >

Help w/Class::Date Date.xs

2003-10-13 Thread perl
Can someone help me with where to put the Date.xs file? I just downloaded the Class-Date-1.1.7.tar.gz. I figured out where to put the 2 files in /usr/lib/perl5/5.8.0/Class: - Class::Date.pm - Class::Date::Const.pm - Date.xs -where shoud it go? I ran th test in the t directory which look like a

help float to string

2003-10-14 Thread perl
Can someone help me with retaining the precisions when they are zero? ie - $f = 9.00 $z = $f; print $z; #result in 9 - bad I want 9.00 $fx = 9.25 $z = $fx; print $z; #result in 9.25 - good I can but don't want to use a sub like itoa. Is there a better way to convert to string? $z=itoa($f); pri

Which action button clicked?

2003-10-14 Thread perl
Can someone show me how to determine which button the user clicked? use CGI; $cgi->param did not contain the action parameter. I want to determine if the user click the LEFT or RIGHT button: ... ... thanks -rkl - eMail solutions by http://www.swanmai

Re: Which action button clicked?

2003-10-14 Thread perl
thanks > On Tue, 14 Oct 2003 02:35:02 -0700, perl wrote: >> Can someone show me how to determine which button the user clicked? > > This hasn't all that much to do with Perl, really. > >> >> > > Name your input fields. For example something like

Re: Help w/Class::Date Date.xs

2003-10-14 Thread perl
sitting in my tmp dir. I looks like a C type of file. So, please tell me how to install it. fyi, I've never installed a cpan or any perl package, if there is such a thing. thanks, > [EMAIL PROTECTED] wrote: > >> Can someone help me with where to put the Date.xs file? >> &g

clean up sub?

2003-10-14 Thread perl
Can someone shorten this upper routine? sub toUpper { my $z = shift; $z =~ tr/a-z/A-Z/; return $z; } Also in a slightly different scenario, how can i change the value of the parameter itself with a sub. $a="ca"; toUpper($a); #change the $a value itself print $a; #I want it to print "CA"

Re: clean up sub?

2003-10-14 Thread perl
I like that - lc() and uc() Hmm... I wonder why it is not in the orielly book? thanks, -rkl > On Tuesday, October 14, 2003, at 05:59 PM, [EMAIL PROTECTED] wrote: > >> Can someone shorten this upper routine? >> >> sub toUpper >> { my $z = shift; >> $z =~ tr/a-z/A-Z/; >> return $z; >> } > > Yes,

Re: clean up sub?

2003-10-14 Thread perl
Great stuff everyone! Some of it is still greek to me ;) here's what I got to work for me: #!/usr/bin/perl my $a="aBe"; my $b="bOb"; my $c="cAb"; aUpper($a); bUpper($b); cUpper($c); print $a . " " . $b . " " . $c . "\n"; #

RE: Help w/Class::Date Date.xs

2003-10-14 Thread perl
THanks alot for the install info. But I would like your opinion for the following questions: 1 - Do you think that it will work without installing the XS? It seems to be working fine but it is giving me a warning message all the time. 2 - DO I need to worry about it messing anything (kernel/perl

Another sub clean up

2003-10-14 Thread perl
Can someone hlpe me clean up this trim? Rule: remove all trailing blanks and newline/LF Do I need a chomp here somewhere? sub trim { my $z = $_[0]; $z =~ s/^\s+//; $z =~ s/\s+$//; return $z; } thanks, -rkl - eMail solutions by http://www.swanma

RE: Help w/Class::Date Date.xs

2003-10-14 Thread perl
Win32 -- see below. There > should be no problem installing the module from sources since it will be > installed in a way that does not conflict with any other modules, and > loading its lib will only add uniquely identified functions to the > runtime perl process so they won't be mista

Re: Help w/Class::Date Date.xs

2003-10-14 Thread perl
Your response is great! Being new to the environment, simple and fundamental things can be frustrating. Your step-by-step instruction not only made it possible to install but it gave me a clue into understanding how the perl/cpan are structured/organized. I just have a follow-up question. Is

Re: Help w/Class::Date Date.xs

2003-10-14 Thread perl
> [panda]$ perl -MDate::Class -le 'print $INC{"Date/Class.pm"}' Do you think you meant this? > [panda]$ perl -MClass::Date -le 'print $INC{"Class/Date.pm"}' thanks --- > [EMAIL PROTECTED] wrote: > >> I downloaded the t

Re: Another sub clean up

2003-10-15 Thread perl
> On Tue, 14 Oct 2003 19:26:50 -0700, perl wrote: >> Can someone hlpe me clean up this trim? > > What do you actually mean by "clean up"? Make the code shorter and, > maybe, more obfuscated? Why? -- - more shorter - Yes - more obfuscated - h

making a variable execute

2003-10-17 Thread perl
Can someone show me how to make this compute? my $a=2; my $b=3; my $oper="+"; my $c = $a $oper $b; where $c would have a value of 5. thanks, -rkl - eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: making a variable execute

2003-10-17 Thread perl
thanks >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> Sent: Friday, October 17, 2003 3:54 PM >> To: [EMAIL PROTECTED] >> Subject: making a variable execute >> >> >> Can someone show me how to make this compute? >> >> my $a=2; >> my $b=3; >> my $oper="+"; >>

what is time?

2003-10-17 Thread perl
How can I convert it to a readable date? $now=time; print $now return 1066442632 I had tied perldoc time but it says: No documentation found for "time". thanks, - eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED

  1   2   3   4   5   6   7   >