Problems? Is your data what you think it is? PerlMonks

### checking for config file param

by PerlSufi (Friar)
 on Jun 11, 2013 at 17:40 UTC Need Help??
PerlSufi has asked for the wisdom of the Perl Monks concerning the following question:

hello monks, I wanted to check if a config file param is not "" and if it isn't, crawl with the information contained in the param. Here is what I have:
use WWW::Mechanize;
use Config::Simple;
if($cfg->param("$ARGV[0]".".notification2") != "") {
my $notif2 =$cfg->param("$ARGV[0]".".notification2");$mech->get('http://path/to/site.php');
$mech->submit_form( form_name => 'notification_form', fields => {"email" =>$notif2, }
);
}
[download]

That param is not empty, so why is it not posting?

Replies are listed 'Best First'.
Re: checking for config file param
by hippo (Monsignor) on Jun 11, 2013 at 17:49 UTC

!= compares numbers whereas ne compares strings. warnings usually picks this up. HTH.

Thanks!
That did it..
peace!

Create A New User
Node Status?
node history
Node Type: perlquestion [id://1038295]
Approved by davido
help
Chatterbox?
 [thezip]: So I have a script that generates a log file. After script completion, I want tohave VIM open this logfile. [thezip]: i don't get the command line "back" until I close VIM. No what I want to happen... [thezip]: I currently don't have access to CYGWIN, else I'd just do a tail -f on the logfile. [Corion]: thezip: If you want to open vim and can live with opening a second console window, use start "The results" vim.exe c:\path\to\logfile .log [thezip]: Ooops... I lied. I guess Cygwin is back. I'll just do a tail -f instead. Better. Sorry for the noise.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2017-03-27 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Should Pluto Get Its Planethood Back?

Results (321 votes). Check out past polls.