PArsing tables of web page directly on the web.

2007-10-23 Thread Siva Prasad
Hi Gurus, I wanted to parse a PHP page which is on web. I don't have access to server where the PHP page is hosted. So I wanted to get source of that particular page and then parse the source file. Here is the code: ---Code use LWP::UserAgent ; $ua = new LWP::UserA

Re: undefined symbol: Perl_sv_2iv_flags

2007-10-23 Thread Tom Phoenix
On 10/23/07, sivasakthi <[EMAIL PROTECTED]> wrote: > I have executed the cgi files , It throws the following error in error > log, Why do you say you found the message in the "error log"? Surely you test your programs before you install them on a server, no? Does the message not appear when you t

undefined symbol: Perl_sv_2iv_flags

2007-10-23 Thread sivasakthi
Hi All, I have executed the cgi files , It throws the following error in error log, symbol lookup error: /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/GD/GD.so: undefined symbol: Perl_sv_2iv_flags,referer: http://... Perl version is: v5.8.8 perl-Gd rpm is : perl-GD-2.35-1.fc5

Re: Any clues to access Chinese folder name on Win32 ?

2007-10-23 Thread Panda-X
2007/10/23, Tom Phoenix <[EMAIL PROTECTED]>: > > On 10/23/07, Panda-X <[EMAIL PROTECTED]> wrote: > > > Thanks for the reply. But seems I have no luck with that ! > > Did you try readdir() or glob(), as I suggested? I can't see them in your > code. > > --Tom Phoenix > Stonehenge Perl Training > Ye

Re: Another noobie question about perl on Windows - perl running in background

2007-10-23 Thread Jeff Pang
If perl consume your system source large,it mostly has two reasons: 1) Your task is really hard,ie,to handle a huge file. 2) Wrong usage with perl code. So you'd better to describe clearly what you are doing and how you do it.Also posting some code piece here is better. On 10/24/07, Ayesha <[EMA

Re: Can't figure the regex

2007-10-23 Thread Tom Phoenix
On 10/23/07, newBee <[EMAIL PROTECTED]> wrote: > ^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$ > > Its look like an email address... is it..? It might be somebody's attempt at matching an e-mail address. But it fails to match many valid addresses, while not excluding all invalid ones

Re: Can't figure the regex

2007-10-23 Thread Jeff Pang
Yes,this is a regex for email matching,but may be broken under some cases. The username part can be all a-z,A-Z,0-9, "-", "." and "_" characters. The first tld part (before the ".") take the same character range as username. the last tld part (after the ".") can be a-z and A-Z only,and the length

Re: line-equation program gives wrong results

2007-10-23 Thread Tom Phoenix
On 10/23/07, camotito <[EMAIL PROTECTED]> wrote: > I was just implementing this small program for calculating the line- > equation, given two points. > Just in case you don't remind this equation y = slope * x + b. > First I calculate the slope and then b: > > $slope = ($ARGV[1] - $ARGV[3]) /

Re: line-equation program gives wrong results

2007-10-23 Thread Lawrence Statton
> > $slope = ($ARGV[1] - $ARGV[3]) / ($ARGV[0] - $ARGV[2]); > $b = $ARGV[1] - ($ARGV[0] * $slope); > print "\n$ARGV[1] = $slope * $ARGV[0] + $b\n"; > > For this input : > > perl my_program 16.81 16.57 0 0 > > It gives me this result : > > 16.57 = 0.985722784057109 * 16.81 + 0 > > Clearly

line-equation program gives wrong results

2007-10-23 Thread camotito
Hello! I was just implementing this small program for calculating the line- equation, given two points. Just in case you don't remind this equation y = slope * x + b. First I calculate the slope and then b: $slope = ($ARGV[1] - $ARGV[3]) / ($ARGV[0] - $ARGV[2]); $b = $ARGV[1] - ($ARGV[0] * $s

Re: problem runing code | strange Error

2007-10-23 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: Im trying to run this code: (im getting this error message): Can't use string ("From") as a HASH ref while "strict refs" in use at / usr/lib/perl5/site_perl/5.8.8/Mail/Mailer.pm line 320. The code: use strict; use warnings; use Mail::Mailer; my @lines = (); open (INFO

Can't figure the regex

2007-10-23 Thread newBee
^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$ Its look like an email address... is it..? it will be a great help if some one could give a breakdown on the this regex. thanks in advance... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

Another noobie question about perl on Windows - perl running in background

2007-10-23 Thread Ayesha
Hi all Thanks to all who replied to my question yesterday. I am using perl- express IDE to write a small perl code. Sometimes the code runs for a long time (infinite loop logical error), I close the editor but realize that the computer is suddenly running slow. So I have to go to task manager and

problem runing code | strange Error

2007-10-23 Thread [EMAIL PROTECTED]
Hi, Im trying to run this code: (im getting this error message): Can't use string ("From") as a HASH ref while "strict refs" in use at / usr/lib/perl5/site_perl/5.8.8/Mail/Mailer.pm line 320. The code: use strict; use warnings; use Mail::Mailer; my @lines = (); open (INFO, "/var/log/messages")

Re: Getting error message while installing Crypt-DSA module

2007-10-23 Thread Tom Phoenix
On 10/23/07, kilaru rajeev <[EMAIL PROTECTED]> wrote: > I found following message while installing the Net::SSH module. > Please advice me know what it really meant. It really means that you've made a mistake at some earlier step, which you should go back and re-do. It looks as if your C compile

Re: String processing

2007-10-23 Thread Mark Wagner
On 10/23/07, Matthew Whipple <[EMAIL PROTECTED]> wrote: > Mark Wagner wrote: > > I'm working on a program to process Wikipedia pages. Wikipedia pages > > can contain templates of the form: > > > > {{template name > > |key = value > > |key2 = value2 > > |... > > }} > > > > Any value may in turn be

Re: how to insert rows into database from array/hash using DBI

2007-10-23 Thread Matthew Whipple
[EMAIL PROTECTED] wrote: > I'm trying to grab data from an MS-Access log file and put it into a > fast, read-only database. (I'm thinking SQL Lite at this point.) > Make sure that's it's only read-only after it's written to. Depending on what you're doing with the data it may be easiest and fas

Re: Help generating XML output

2007-10-23 Thread Jenda Krynicky
From: Rob Dixon <[EMAIL PROTECTED]> > Jenda Krynicky wrote: > > It's just a matter of one map(): > > > > #!perl > > use XML::Generator; > > > > $ref = { > > 'dermot' => '10', > > 'joe' => '17', > > 'rose' => '11', > > 'phil' => '13', > > 'brian' => '20', > >

Re: String processing

2007-10-23 Thread Dr.Ruud
"Mark Wagner" schreef: > I'm working on a program to process Wikipedia pages. Wikipedia pages > can contain templates of the form: > > {{template name > |key = value > |key2 = value2 > | ... > }} > > Any value may in turn be a template, with essentially no limit to the > level of nesting. Given

Re: String processing

2007-10-23 Thread Matthew Whipple
Mark Wagner wrote: > I'm working on a program to process Wikipedia pages. Wikipedia pages > can contain templates of the form: > > {{template name > |key = value > |key2 = value2 > |... > }} > > Any value may in turn be a template, with essentially no limit to the > level of nesting. Given a "key

Re: String processing

2007-10-23 Thread yitzle
Recursion is the way I'd solve something like this. Start processing the data, line by line, and when you hit a 'begin template' ({{), recursively process it. An example of a nested template and a sample of what you are trying to generate might make it easier to be specific about the solution --

String processing

2007-10-23 Thread Mark Wagner
I'm working on a program to process Wikipedia pages. Wikipedia pages can contain templates of the form: {{template name |key = value |key2 = value2 |... }} Any value may in turn be a template, with essentially no limit to the level of nesting. Given a "key = value" pair, how would I go about re

Re: Help generating XML output

2007-10-23 Thread Rob Dixon
Jenda Krynicky wrote: From: Rob Dixon <[EMAIL PROTECTED]> I am unfamiliar with XML::Generator, but have experimented with it for the purposes of your question and it seems to be essentially a translator that will convert a Perl fragment into an XML fragment, and I can see no way to modify existi

Re: Getting error message while installing Crypt-DSA module

2007-10-23 Thread kilaru rajeev
Hi All, Thanks for your quick responce. I found following message while installing the Net::SSH module. t/03-packet..Can't load '/crdv8/shared/perl/lib/site_perl/5.8.3/sun4-solaris/auto/Math/GMP/GMP.so' for module Math::GMP: ld.so.1: perl5.8.3: fatal: relocation error: file /crdv8/shared/per

Re: problem runing code | strange Error

2007-10-23 Thread Jenda Krynicky
From: Juan B <[EMAIL PROTECTED]> > Ok I did it and know I get another error :-( > here goes the error: > Died at /usr/lib/perl5/site_perl/5.8.8/Mail/Mailer.pm > line 284. That's not a very informative error message. anyway maybe it's time to go read the Mail::Mailer's docs. Sea

Re: problem runing code | strange Error

2007-10-23 Thread Juan B
Ok I did it and know I get another error :-( here goes the error: Died at /usr/lib/perl5/site_perl/5.8.8/Mail/Mailer.pm line 284. this is the code: use strict; use warnings; use Mail::Mailer; my @lines = (); open (INFO, "/var/log/messages") or die "$!"; while (my $line = ) { if ($line =~ /I

Re: Help generating XML output

2007-10-23 Thread Beginner
On 23 Oct 2007 at 16:46, Jenda Krynicky wrote: > From: "Beginner" <[EMAIL PROTECTED]> > > On a more general point I haven't found it easy to find modules > that > > output XML or perhaps I should say, I didn't find the ones I did > look > > at to be well documented in terms of examples or show t

Re: Any clues to access Chinese folder name on Win32 ?

2007-10-23 Thread Tom Phoenix
On 10/23/07, Panda-X <[EMAIL PROTECTED]> wrote: > Thanks for the reply. But seems I have no luck with that ! Did you try readdir() or glob(), as I suggested? I can't see them in your code. --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

Re: Insecure dependency in open while running setuid at

2007-10-23 Thread Tom Phoenix
On 10/23/07, anders <[EMAIL PROTECTED]> wrote: > I have a program witch calls a test program i PERL > The testa prorgam gets a filname and parameters in > Ans supose to just write data to a output file > But i get an error saying > "Insecure dependency in open while running setuid at" I'm not sur

Re: Help generating XML output

2007-10-23 Thread Jenda Krynicky
From: "Beginner" <[EMAIL PROTECTED]> > On a more general point I haven't found it easy to find modules that > output XML or perhaps I should say, I didn't find the ones I did look > at to be well documented in terms of examples or show the variety of > different ways data structures can be repre

Re: Absolute noobie question regarding opening files on Windows platform

2007-10-23 Thread Jenda Krynicky
From: Paul Lalli <[EMAIL PROTECTED]> > You are asking *us* why Perl can't open the file, before you ask > *Perl* why it can't open the file. That is most illogical... > > Your die() message should include the $! variable, which contains the > last operating system error. It will tell you why the

Re: problem runing code | strange Error

2007-10-23 Thread Jenda Krynicky
From: Juan B <[EMAIL PROTECTED]> > use Mail::Mailer; > > > >my $mailer = Mail::Mailer->new("smtp", > "10.83.27.71"); >$mailer->open( 'From' => 'Syslog > <[EMAIL PROTECTED]>', > 'To' => 'gabriela pinado > <[EMAIL PROTECTED]>', > 'Subject' => 'PiX Detecte

Re: problem runing code | strange Error

2007-10-23 Thread Juan B
Hi, I did it and know I get another error: syntax error at logcheck line 25, near "'PiX Detected Attack } ' )" Missing right curly or square bracket at logcheck line 28, at end of line Execution of logcheck aborted due to compilation errors. This is the code: use strict; use warnings; use Mail:

Re: problem runing code | strange Error

2007-10-23 Thread Paul Lalli
On Oct 23, 9:57 am, [EMAIL PROTECTED] (Juan B) wrote: > -Hi, > > Im trying to run this code: (im getting this error > message): > > Can't use string ("From") as a HASH ref while "strict > refs" in use at > /usr/lib/perl5/site_perl/5.8.8/Mail/Mailer.pm line > 320. > > The code: > > use strict; > use

Re: Absolute noobie question regarding opening files on Windows platform

2007-10-23 Thread Paul Lalli
On Oct 23, 12:27 am, [EMAIL PROTECTED] (Ayesha) wrote: > I was not in the right directory, but I learnt about forward and > backward slashed also. Thanks to all who replied Arg. This is exactly what I was afraid of. The post about forward vs backwards slashes was wrong. Do not follow it. You

problem runing code | strange Error

2007-10-23 Thread Juan B
-Hi, Im trying to run this code: (im getting this error message): Can't use string ("From") as a HASH ref while "strict refs" in use at /usr/lib/perl5/site_perl/5.8.8/Mail/Mailer.pm line 320. The code: use strict; use warnings; use Mail::Mailer; my @lines = (); open (INFO, "/var/log/messages"

Re: Absolute noobie question regarding opening files on Windows platform

2007-10-23 Thread Paul Lalli
On Oct 22, 3:27 pm, [EMAIL PROTECTED] (Ayesha) wrote: > Hi all > > I wrote this code to read a file (in the same directory as the script) > on Win XP > ***­ > #!/usr/local/bin/perl > use strict; > use wa

Re: Absolute noobie question regarding opening files on Windows platform

2007-10-23 Thread Paul Lalli
On Oct 22, 7:49 pm, [EMAIL PROTECTED] (Yitzle) wrote: > The '/' is used on Unix, but not on Windows. > Try replacing it with a '\' > open(READFILE1,"<.\Sample_text_file.txt") or die ("Cannot open the given > file"); > Or maybe just drop the './' entirely. To the OP, please ignore this post comple

Re: How do I properly use global variables?

2007-10-23 Thread Matthew Whipple
Jeff Pang wrote: > On 10/23/07, monk <[EMAIL PROTECTED]> wrote: > >> I'm having problems accessing a variable outside its subroutine. >> I've tried several combinations too long to write here. Maybe I just >> can't see the forest for the trees. But I'm lost. I need your >> wisdom. >> >> I'd li

Re: Help generating XML output

2007-10-23 Thread Beginner
On 23 Oct 2007 at 14:21, Jenda Krynicky wrote: > From: Rob Dixon <[EMAIL PROTECTED]> > > I am unfamiliar with XML::Generator, but have experimented with it > for > > the purposes of your question and it seems to be essentially a > translator > > that will convert a Perl fragment into an XML fragme

Re: Date addition-reg

2007-10-23 Thread jeevs
On Oct 23, 2:19 pm, [EMAIL PROTECTED] wrote: > Hi > > Thaks for ur valuable info.. > > my code is > > my $total_nights="3"; > $total_nights = "0".$total_nights if ((!($total_nights =~ > /^0/)) && ($total_nights < 10)); > my $start_date="2008-03-24"; > my ($year,$mon,$day) = split/-/,$start_

Re: PHP parsing

2007-10-23 Thread Jenda Krynicky
From: "Siva Prasad" <[EMAIL PROTECTED]> > I have a PHP page I need to click on the links that are there on the php > which will navigate me to another PHP page and I need to parse data on them > > Is there any Perl modules that will server my purpose. It's irrelevant that it's PHP on the server s

Re: Help generating XML output

2007-10-23 Thread Jenda Krynicky
From: Rob Dixon <[EMAIL PROTECTED]> > I am unfamiliar with XML::Generator, but have experimented with it for > the purposes of your question and it seems to be essentially a translator > that will convert a Perl fragment into an XML fragment, and I can see no > way to modify existing XML. Because o

Re: Help generating XML output

2007-10-23 Thread Rob Dixon
Beginner wrote: I have been trying to output XML that looks like this: dermot joe ... I have tried XML::Simple and XML::Generator but keep hitting the same problem when it comes to separating the id attribute and the value from my hash reference. $VAR1 = { 'der

Re: how to insert rows into database from array/hash using DBI

2007-10-23 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: I'm trying to grab data from an MS-Access log file and put it into a fast, read-only database. (I'm thinking SQL Lite at this point.) The code below is working. Now I need to put the identical data and structure into an SQL Lite table. Any suggestions on where to look

Insecure dependency in open while running setuid at

2007-10-23 Thread anders
I have a program witch calls a test program i PERL The testa prorgam gets a filname and parameters in Ans supose to just write data to a output file But i get an error saying "Insecure dependency in open while running setuid at" Any ide, i'dont like to have rewrite the program i eg. C.. mutch easy

Re: How to use Perl for email

2007-10-23 Thread Jenda Krynicky
From: johnnyp <[EMAIL PROTECTED]> > Yes including code and errors would have been more helpful on my > part. I am attempting to use Mail::SendMail with the following code: > > #!C:\Perl\lib\mail > > use strict; > use warnings; > use Mail::SendMail; > > > my%mail = ( To => '[EMAIL PR

Re: How to use Perl for email

2007-10-23 Thread Gunnar Hjalmarsson
johnnyp wrote: I am attempting to use Mail::SendMail with the following code: #!C:\Perl\lib\mail use strict; use warnings; use Mail::SendMail; ^ Case matters, even if you are on Windows. my%mail = ( To => '[EMAIL PROTECTED]', From=> '[EMAIL PROTE

RE: Perl module

2007-10-23 Thread Sayed, Irfan (Irfan)
Thanks Jeff. It's working now. Regards Irfan. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Pang Sent: Tuesday, October 23, 2007 2:30 PM To: Sayed, Irfan (Irfan) Cc: beginners@perl.org Subject: Re: Perl module use lib qw(/home/ccvob01/irf

Re: How to use Perl for email

2007-10-23 Thread johnnyp
On Oct 22, 6:52 am, [EMAIL PROTECTED] (Jeff Pang) wrote: > There're lots of modules for sending mail on CPAN.like: > > Mail::Sender > Email::Send > MIME::Lite > Net::SMTP > ... > > which method do you use and what error message did you get? > > On 10/22/07, johnnyp <[EMAIL PROTECTED]> wrote: > > >

Insecure dependency in open while running setuid at

2007-10-23 Thread anders
I have a program witch calls a test program i PERL The testa prorgam gets a filname and parameters in Ans supose to just write data to a output file But i get an error saying "Insecure dependency in open while running setuid at" Any ide, i'dont like to have rewrite the program i eg. C.. mutch easy

Re: Getting error message while installing Crypt-DSA module

2007-10-23 Thread sisyphus
On Oct 23, 1:15 am, [EMAIL PROTECTED] (Kilaru Rajeev) wrote: > Hi All, > > I am getting the following error in the *make test* part while istalling the > *Crypt::DSA* module. Please give me an advice how to procede. > > t/03-keygen.*Math::BigInt: couldn't load specified math lib(s), fallback >

how to insert rows into database from array/hash using DBI

2007-10-23 Thread petelink1
I'm trying to grab data from an MS-Access log file and put it into a fast, read-only database. (I'm thinking SQL Lite at this point.) The code below is working. Now I need to put the identical data and structure into an SQL Lite table. Any suggestions on where to look for examples? (or if you w

Re: Help generating XML output

2007-10-23 Thread Beginner
On 23 Oct 2007 at 12:12, Rob Coops wrote: > foreach my $k (keys %{$ref}) { > $xml = $gen->users( # $xml gets over written with every new > key So instead of doing that I would try $xml .= (appending) > $gen->username({ id => $ref->{$k}},$k), >

Re: Help generating XML output

2007-10-23 Thread Rob Coops
foreach my $k (keys %{$ref}) { $xml = $gen->users( # $xml gets over written with every new key So instead of doing that I would try $xml .= (appending) $gen->username({ id => $ref->{$k}},$k), ); } On 10/23/07, Beginner <[EMAIL

Help generating XML output

2007-10-23 Thread Beginner
Hi, I have been trying to output XML that looks like this: dermot joe ... I have tried XML::Simple and XML::Generator but keep hitting the same problem when it comes to separating the id attribute and the value from my hash reference. $VAR1 = { 'dermot' => '10',

Re: Date addition-reg

2007-10-23 Thread Jeff Pang
Please don't open a new topic when you repeat the same question. >$day=($day+$total_nights); I've said clearly,you can't do date oprations by this way. See my before message that answered your question fully. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

Re: Any clues to access Chinese folder name on Win32 ?

2007-10-23 Thread Panda-X
Hi Phoenix, Thanks for the reply. But seems I have no luck with that ! Please see attached screen capture and here's my code. My basic code is simply like this : use Tk; my $mw = MainWindow -> new(); my $x = $mw -> getOpenFile ; $mw -> Label ( -text=>$x ) -> pack(); open F , $x or $mw -> Label (

Re: PHP parsing

2007-10-23 Thread Jeff Pang
PHP finally generate a html page,is it? so you can take a look at HTML::Parser module: http://search.cpan.org/~gaas/HTML-Parser-3.56/Parser.pm On 10/23/07, Siva Prasad <[EMAIL PROTECTED]> wrote: > > > > > Hi Gurus, > > > > I have a PHP page I need to click on the links that are there on the php >

Date addition-reg

2007-10-23 Thread neelike
Hi Thaks for ur valuable info.. my code is my $total_nights="3"; $total_nights = "0".$total_nights if ((!($total_nights =~ /^0/)) && ($total_nights < 10)); my $start_date="2008-03-24"; my ($year,$mon,$day) = split/-/,$start_date; $day=($day+$total_nights);

PHP parsing

2007-10-23 Thread Siva Prasad
Hi Gurus, I have a PHP page I need to click on the links that are there on the php which will navigate me to another PHP page and I need to parse data on them Is there any Perl modules that will server my purpose. Thanks in Advance. PP <>

Re: Perl module

2007-10-23 Thread Jeff Pang
use lib qw(/home/ccvob01/irf/lib); this line should be put *before* any modules you want to import from the specified path. On 10/23/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote: > > Still the error is same. > > Please find the attached Perl script for reference. > > Please guide. > > Regar

RE: Perl module

2007-10-23 Thread Sayed, Irfan (Irfan)
Still the error is same. Please find the attached Perl script for reference. Please guide. Regards Irfan. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Pang Sent: Tuesday, October 23, 2007 2:18 PM To: Sayed, Irfan (Irfan) Cc: beginners@perl.o

Re: Perl module

2007-10-23 Thread Jeff Pang
this line is not correct: use lib qw(/home/ccvob01/irf/lib/SendMail.pm); you should do, use lib qw(/home/ccvob01/irf/lib); the .pm file is not included. On 10/23/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote: > > > This is the error which I am getting > > Can't locate SendMail.pm in @INC (@

RE: Perl module

2007-10-23 Thread Sayed, Irfan (Irfan)
This is the error which I am getting Can't locate SendMail.pm in @INC (@INC contains: /opt/rational/common/lib/perl5/5.8.6/sun4-solaris-multi /opt/rational/common/lib/perl5/5.8.6 /opt/rational/common/lib/perl5/site_perl/5.8.6/sun4-solaris-multi /opt/rational/common/lib/perl5/site_perl/5.8.6 /op

Re: pattren maching and mail sending please help !

2007-10-23 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: I need a script which will read and send mail each time a message with the word IDS is generated under /var/log/messages. this is the script, which I know have lots of errors: #!/usr/local/bin/perl # # Program to check /var/log/messeges for alerts contining the word I

Re: Perl module

2007-10-23 Thread Jeff Pang
On 10/23/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote: > Hi All, > > How to refer Perl module in Perl script which is not there in the @INC > path. I don't have permission to add this module in the @INC path > > I need to use the SendMail.pm module , but that is not there in the > default @IN

Re: How do I properly use global variables?

2007-10-23 Thread Jeff Pang
On 10/23/07, monk <[EMAIL PROTECTED]> wrote: > I'm having problems accessing a variable outside its subroutine. > I've tried several combinations too long to write here. Maybe I just > can't see the forest for the trees. But I'm lost. I need your > wisdom. > > I'd like my program below to change

Re: How do I properly use global variables?

2007-10-23 Thread Rob Coops
You might want to try the following call your script twice with the start argument, then look at the processes running (just send the output of the script to /dev/null or something like that for ease of use) You will see the script running twice, this is because you started the Perl interpreter t

How do I properly use global variables?

2007-10-23 Thread monk
I'm having problems accessing a variable outside its subroutine. I've tried several combinations too long to write here. Maybe I just can't see the forest for the trees. But I'm lost. I need your wisdom. I'd like my program below to change $status to zero to exit the loop. meaning...$> perl tes

Re: Perl module

2007-10-23 Thread Rob Coops
I found the following a very easy way to include libs not on the default path. # Set the lib path for our own libs use FindBin; use lib "$FindBin::Bin/lib"; This way if you want to have for instance: Net::Sendmail as a module all you need to do is create a directory: Net in the lib directory and

Perl module

2007-10-23 Thread Sayed, Irfan (Irfan)
Hi All, How to refer Perl module in Perl script which is not there in the @INC path. I don't have permission to add this module in the @INC path I need to use the SendMail.pm module , but that is not there in the default @INC path. Can I refer the path of this module in my actual Perl script?

Re: Absolute noobie question regarding opening files on Windows platform

2007-10-23 Thread Ayesha
On Oct 22, 9:32 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > Ayesha wrote: > > Hi all > > > I wrote this code to read a file (in the same directory as the script) > > on Win XP > > ***­ > > #!/usr/local/bi

pattren maching and mail sending please help !

2007-10-23 Thread [EMAIL PROTECTED]
Hi, My name is juan. Im very new to Perl so please give me a hand here, Im working on this script lot of time and without sucess. I need a script which will read and send mail each time a message with the word IDS is generated under /var/log/messages. this is the script, which I know have lots