not 100% sure but you can try using \s*(\w+)\s* instead of .+ in your statement
---
cheers!
san
print length "The answer to life, universe & everything!
Hi,
I'd use XML::Simple to write the same thing back to the file unless i missed something.. this code is copied from a file so you may need to tweak it per your needs
#!/usr/bin/perl
use strict;
use XML::Simple;
sub hash2xml {
my $info = shift;
my $xs = XML::Simple->new(...
Hi,
Can someone help me out with this example:
Suppose I want to write this code in Flex
<mx:Button id="b1" includeInLayout="{b1.visible}">
No what I want to do INSTEAD is instead of "b1" i want to refer to the component inline, like the "this" keyword. So my new (compact) code would be...
yep for that you need to make that into a global array. Append the domains using a pattern match instead of hardcoding it.. so while pushing in the values, if the link doesn't start with a ^http:// then push it like "http://$dom/$link" where $dom holds the value of $1 of your match.
HTH
---...
Yes, its pretty easy... it can be done in a very few lines i suppose. The algo for this should be like this:
my $mx = Net::DNS ( "MX" Record(s) by weight || "A" Record ); #`dnsmx domain` if you have djbdns
my $sock = socket ( $mx, port(25) );
if ( /banner greeting/ )
{
Print to $sock, SMTP...
Not really sure if this fits your problem, but the general rule of the thumb is to use IO::Select or IO::Poll with a timeout and then check the flags for errors, data, etc. Because of the timeout your programs runs (in a loop) regardless of anything.
HTH,
San
---
cheers!
san
print length...
Hi,
1) Not all because you can easily mix the normal cgi scripts with your apache handlers. Simplistically speaking you would want the scripts that get hit on 10 times a second in mod_perl (like say a redirection URL on tinyurl.com) and you want your long tedious scripts (like one that sends...
You can use the Params Hash to do this
use CGI qw/:standard -no_debug/;
my %FORM = CGI::Vars();
print<<EOF;
<BR>First name: <input type="text" name="First" value="$FORM{'first'}">
<BR>Last name: <input type="text" name="Last" value="$FORM{'last'}">
<BR><BR><BR><input type="submit"...
Hi,
Hoping that you just need to "trigger" the perl script( and not get any response from it), you can use the following javascript.
<script>
var img = new Image;
function allDone()
{
img.src = "http://domain.com/cgi-bin/perl.cgi?name=san&more=1&rand="+Math.random();
}
allDone();
</script>...
you can try using the exists function: if (exists($Hash->{'Value'})) {}
"I have tried to use the DEFINED function, but it's not reliable with hashes"... haha :)
---
cheers!
san
print length "The answer to life, universe & everything!
if you'd like to sleep for less than a second, try using Time::HiRes. It allows you to sleep in microseconds.
There is also something about file triggers (linux), i once browsed in a book which could be a TIMTOWTDI. But I wouldn't go that route unless really neccessary.
---
cheers!
san
print...
Hi,
I posted something similar (not about JPL though) a long time back here. You may find it of interest:
http://www.tek-tips.com/viewthread.cfm?qid=702166&page=1
---
cheers!
san
print length "The answer to life, universe & everything!
yes, that is correct. which is why i would suggest not using it for a production server.
The reason for using sleep inside the while loop is because sleep suspends the process and hence there is no noticable CPU utilization until the next check.
---
cheers!
san
print length "The answer to...
try using Date::Manip from CPAN. The function you're looking for is most probably DateCalc.
---
cheers!
san
print length "The answer to life, universe & everything!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.