> I need the code below to execute the sub double_check($host) but I
still
> want the while loop to continue exactly what it's doing.
>
> Is this possible with Perl|?
>
> while (1) {
> $p = Net::Ping->new("icmp", 4, 2); #Ping object. Uses icmp
> protocal
> foreach $host (sort keys (%host
List,
I need the code below to execute the sub double_check($host) but I still
want the while loop to continue exactly what it's doing.
Is this possible with Perl|?
while (1) {
$p = Net::Ping->new("icmp", 4, 2); #Ping object. Uses icmp
protocal
foreach $host (sort keys (%host)) {
It's tough to figure out what you're trying to accomplish, since the "i"
modifier on the regex doesn't make any sense, but if you want the "g"
modifier to cause repeated passes on the string, then you need to place the
regex in its own loop.
Something like this:
while ()
{
print WRITE "'
Thanks a lot for such a clear explanation. Now it all seems to fall in
place (: and obviously, obvious :).
- warm regards,
LFTLMFY (: Looking Forward To Learning More From You, that is :)
Atul
Michael Fowler <[EMAIL PROTECTED]>
09/20/01 01:02 PM
To: [EMAIL PROTECTE
On Sep 19, 2001 at 10:35 -0700, Matthew Peter Lyon took the soap box and proclaimed:
: This group just needs to really calm down.
Yes, and this thread is quite off topic and quite finished.
Casey West
--
Shooting yourself in the foot with troff
rmtroff -ms -Hdrwp | lpr -Pwp2 & .*place bulle
I want to connect to an FTP server and get some files.
I found the "Being an FTP Client" document in the Perl
Cookbook which has the following lines:
$ftp = Net::FTP->new("ftp.host.com") or die "Can't
connect: $@\n";
$ftp->login($username, $passwd) or die "Couldn't
login\n";
My question is:
Do
I'm writing a script which will convert the gdbm files used by wreq to the
MySQL files used by BugZilla, but am having a serious problem. I can't seem
to open the gdbm files for reading.
Here's where the problem is:
# !/usr/local/bin/perl -w
use diagnostics;
# A bunch of currently undefined
I'm not sure what you mean by DBD, but in case I'm right...lol
I'm using MS Access from Office 97 on a Windows 98 server running Apache.
My code works fine unless I go over 6 in my select statement ie.:
$sqlstatement="SELECT pid, name, description, picture, price, sold FROM
gallery ORDER BY
hi,
offhand does anybody know if get ($url) does any sort of cacheing of the
contents of the url? if it does, how do you turn cacheing off?
thanks,
-- drew
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Thu, Sep 20, 2001 at 11:37:50AM -0500, [EMAIL PROTECTED] wrote:
> I think you lost the context.
I was afraid of that.
> My question is not whether %$$self and self are same ( They are not and
> %$this was never a point of debate ). I wanted just the explanation of
> using %$$self in the ***
Some minor corrections.
On Thu, Sep 20, 2001 at 10:46:27AM -0400, Brian wrote:
> When comparing a variable with a string you must use 'eq'. So your
> example would look like:
When comparing a string with a string, you should always use 'eq'. That
it's in a variable is irrelevant.
> if($host
NAME
beginners-faq - FAQ for the beginners mailing list
1 - Administriva
1.1 - I'm not subscribed - how do I subscribe?
Send mail to <[EMAIL PROTECTED]>
You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email address)
On Thu, Sep 20, 2001 at 05:22:14PM +0530, Surarchitha Kumar Kudikyala wrote:
> I have a doubt whether it is possible to evaluate a pattern before using
> it in the pattern matching.
>
> For eg
>
> string =~ /$pattern/
>
> here $pattern is a pattern string contains some perl commands like
> len
> -Original Message-
> From: David Draley [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 20, 2001 12:35 PM
> To: [EMAIL PROTECTED]
> Subject: reg exp
>
>
> hello -
>
> I am trying to search a for any sentence that ends in
> "." or "?" I
> want to only print those sentences t
> -Original Message-
> From: Stephan Tinnemeyer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 20, 2001 9:22 AM
> To: [EMAIL PROTECTED]
> Subject: structure of scripts (newbie Q)
>
>
> I hope I did not overread this in the FAQ:
>
> In some tutorials I found the recommendation to
I think you lost the context. My question is not whether %$$self and
%$self are same ( They are not and this was never a point of debate ). I
wanted just the explanation of using %$$self in the *** context of ***
autovivifying typeglobs. What I really don't understand is how to
interpret the %
Hi all.
I am writing an application in perl and I would like to have it print
things out into global 'Report' objects(warning, error, result reports
etc). In general, I like to think of my reports as tools the
applications uses constantly, but are not a part of it.
Well, creating instances of t
When comparing a variable with a string you must use 'eq'. So your
example would look like:
if($host eq 'access_1') {
$host1 = 'ACESSO 1';
}
elseif($host eq 'access_2') {
$host1 = 'ACESSO 2';
}
When using == with a string, it will always be true. Hope this helps
you.
NOTE: I didn't reall
On Sep 20, Geert Neuts said:
>for ($i = 0; $i < @stuff; $i++) {
> print "$stuff[$i][0] ($stuff[$i][1])\r\n";
>}
$stuff[$i][1] is just a reference to the function. To actually call it,
you'll need to use
&{ $stuff[$i][1] }
or
$stuff[$i][1]->();
However, neither of those expands in a
On Sep 20, G Lakshmi said:
>if (index($OSNAME,"Win",0) > -1)
>{
>use Win32::Process;
>}
That will ALWAYS try to include the Win32::Process module, regardless of
the rest of your program. 'use' statements are executed at compile-time,
while the rest of the code is executed at run-time. You'll w
Can I put functions in arrays to make flexible menus ?
I tried this :
@stuff = (["menu 1", \&func_1],
["menu 2", \&func_2],
["menu 3", \&func_3]);
for ($i = 0; $i < @stuff; $i++) {
print "$stuff[$i][0] ($stuff[$i][1])\r\n";
}
sub func_1 {
print "function 1 called\n
Hi
I have a doubt whether it is possible to evaluate a
pattern before using it in the pattern matching.
For eg
string =~ /$pattern/
here $pattern is a pattern string contains some
perl commands like lenght(str) etc. I want these commands to be evaluated, and
the result of this evalu
I don't know the answer to your question, but...
You can download the PPM files seperately from activestate:
http://www.activestate.com/PPMPackages/zips/5xx-builds-only/
You can then use PPM to install them, but I think that part's covered in the
readmes.
"Reg Smith" <[EMAIL PROTECTED]> wrote i
> It works fine on Windows NT. On Solaris, it gives the foll error message:
>
> Can't locate Win32/Process.pm in @INC (@INC
> contains: /usr/perl5/5.00503/sun4-so
> laris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris
> /usr/perl5/site
> _perl/5.005 .) at sim.pl line 3.
> BEGIN failed
Some other notes...
You don't have to use printf - you can use print. And you don't need the
brackets, or the inverted commas around $path:
if ($path =~ m/^\$/) {
print "Path is env var\n";
} else {
print "Working on phys.dir\n";
}
> > if ( "$path" =~ /^$/ ) {
> >printf("p
Hello,
I searched the internet for any solution about binding parameters to the
SQL statement.
I read something, that in WIN32ODBC, binding parameters is not supported.
I have the following environment:
W2K TS, Activestate Perl, WIN32ODBC driver.
I use this statements:
$sql = "insert into $ta
Do you have access to a DNS server feom your machine?
Run nslookup from the command prompt. Does it return the name of a DNS
server, or does it say something like "default servers are not available".
That could be your problem if it's timing out.
John
-Original Message-
From: Vasileios
Hi there
trying to understand the module I tried the following example (also in the module'es
refrence):
use Net::DNS;
$res = new Net::DNS::Resolver;
$res->debug(1);
$query = $res->search($ARGV[0]);
if ($query) {
foreach $rr ($query->answer) {
next unless $rr->type e
You might want to even try this site... ( I found it very useful as a
starter to CGI.pm)
http://stein.cshl.org/WWW/CGI/
Cheers,
Murtini
- Original Message -
From: "Singh, Harpreet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 20, 2001 10:38 AM
Subject: cgi-lib.p
Hi,
I tried the following script:
if (index($OSNAME,"Win",0) > -1)
{
use Win32::Process;
}
It works fine on Windows NT. On Solaris, it gives the foll error message:
Can't locate Win32/Process.pm in @INC (@INC
contains: /usr/perl5/5.00503/sun4-so
laris /usr/perl5/5.00503 /usr/perl5/site_pe
Hi, folks
I have 5 labels in a perl tk program.
I have this line in my file:
1000975996: 44CGMB0114.col.bsf.alcatel.fr: read request for /bootp/cygwin.bat:
success .
my code is :
open FILE, "< $SYSLOG" or die $!;
while () {
if (/([0-9a-z:]+)\s*via eth0/) {
/^$/ matches a blank line, /^\$/ will do the job for you.
$ is a metacharacter, you will have to escape it. It matches at the end of a
line or before newline at the end.
hth.
Sudarsan
Tanya Bar wrote:
>
> Path could be physical or start with environment variable; so in my script
> I'm trying
Hello Chia
Using the ... range operator appears to do what you want, if I understand correctly;
open(FILE,"input.txt");
while (){
print if !(/^\.SUBCKT (\S\S)/ ... /^\.ends $1/);
}
This print lines that don't fall between lines that match the two patterns
My test file input.txt was like th
33 matches
Mail list logo