alue$/ );
}
flock(OUT, LOCK_UN);
close(OUT);
}
Btw, the above code is just to illustrate the question,
thus no error checking and so forth.
--
=
Shaun Fryer
=
http://sourcery.ca/
ph: 905-529-0591
=
Science is like sex: occa
, I'd
recommend two other modules which I've found myself becoming excedingly
attached to, CGI::Session and HTML::Template. They may have a slightly
steep learning curve if you're new to perl, but the time savings should
make it well worth the effort.
--
=
Shaun
in script you would check the contents
of the temp file every second or so and print a generic status message
(ie. "searching db...") until the job is complete, when it then prints the
final search results.
Comments are welcome from more experienced parties.
--
=
Sha
t
To: Unix Admin <$unixadm>
Subject: $subject
Hello
$text
EOF
--
===
Shaun Fryer
===
London Webmasters
http://LWEB.NET
PH: 519-858-9660
FX: 519-858-9024
===
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Does anyone know off hand if there is a Perl Module for negotiating
and scripting SFTP connections?
===
Shaun Fryer
===
London Webmasters
http://LWEB.NET
PH: 519-858-9660
FX: 519-858-9024
===
--
To unsubscribe, e-mail: [EMAIL PROTECTED
calar value. That works okay for most
purposes, but for the shere fun of it, I want to try doing it a little
differently. Comments?
===
Shaun Fryer
===
London Webmasters
http://LWEB.NET
PH: 519-858-9660
FX: 519-858-9024
===
--
To unsubscri
=~ /\d/) {
$IP = 'yes';
} else {
$IP = 'no';
}
Validating Domains and IP's is alot more intensive, because
there are numerous (and occasionally changing) factors to check for.
===
Shaun Fryer
===
London Webmaste
of JustRef
Shouldn't the second last line read...
---
my @new_array = @{$hash{$jref_key}};
---
? It looks like JustRef() is creating @new_array based on the
hash value previously created in refFunc().
=======
Shaun Fryer
===
London Webmasters
htt
Someone mentioned this problem recently. Here's a solution.
Open the file in vi and type...
:g/[Ctrl+v][Ctrl+m]/s///
That will remove all the Carriage Returns from the file in
one shot.
===
Shaun Fryer
===
London Webmasters
http://LWEB.NE
e array from the key's value later
on, you just split(/\|/,"$hash{some_key}"). I typically do this when
writing berkley db's which need to have variable length arrays as the
values of a list of keys. You'll have to pick a delimiter that won't
exist within $value.
ome_func. In the
> first instance, some_func has access to the arguments of the calling
> function.
Good to know. What happens in the case where I do something as
follows (which I do often and so far successfully)..
&some_func("$var1","$var2","$var3");
utine.
use CGI;
CGI::ReadParse(*formdata);
=======
Shaun Fryer
===
London Webmasters
http://LWEB.NET
PH: 519-858-9660
FX: 519-858-9024
===
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Is there a simple way to comment multiple lines in Perl in a like
manner to the "/*" or "
it inefficient? How about
this...
if ($something =~ /(^string0$|^string1$|string2)/) {
I'm still learning and ironing out alot of my understanding of
proper syntax (especially since I've canabalised alot of Perl4 stuff
until recently), so I appreciate your indulgence. You've already
helped me immensely.
===
Shaun Fryer
===
London Webmasters
http://LWEB.NET
PH: 519-858-9660
FX: 519-858-9024
===
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
uge I've been doing as
follows.
my $test_ok;
$test_ok = 1 if ($something eq 'string0');
$test_ok = 1 if ($something eq 'string1');
$test_ok = 1 if ($something =~ /string2/);
if ($test_ok) {
&do_something;
} else {
&do_somthing_else;
}
Is there a better way
Parse module. I figured it would be as simple as replacing..
require 'cgi-lib.pl';
&ReadParse;
...with..
use CGI;
CGI::ReadParse;
However now when I try to grab a value using $in{key}, all I get for
output is: @dmd `
Does anyone have a clue what I'm missing?
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$name =~ s/\n//g;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/\n//g;
$value =~ s///g; # disallow SSI
I'm trying to convert an old script that used cgi-lib.pl over to using
CGI.pm. In order to save time I'd like to simply do something like
what follows (though that doesn't actually work it seems).
%in = param;
Any ideas?
=======
Shaun Fryer
===
Lo
I know this is probably kindergarten to most of you, but if I had to
do it (I only use Unix) and strip all the HTML, I'd simply do the
following.
$url = 'http://domain/path/to/file';
$file = `lynx -dump $url`;
print $file;
=======
Shaun Fryer
===
Lo
) conversion in reverse is a
little tedious to work out, but it functions very reliably once you
get it down.
=======
Shaun Fryer
===
London Webmasters
http://LWEB.NET
PH: 519-858-9660
FX: 519-858-9024
===
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Try this little baby.
@array = (5, 6, 7, 8);
$integer = print(@array);
chop($integer);
===
Shaun Fryer
===
London Webmasters
http://LWEB.NET
PH: 519-858-9660
FX: 519-858-9024
===
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
this. It's not exactly "realtime", but it
will give you a realistic visual status.
$Count = 4; # or any desired number of ICMP requests
print `ping -c$Count domain.tld`;
===
Shaun Fryer
===
London Webmasters
http://LWEB.NET
PH: 519-858-9660
FX:
22 matches
Mail list logo