[13783] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1193 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 27 22:52:51 1999

Date: Wed, 27 Oct 1999 19:52:27 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <941079146-v9-i1193@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 27 Oct 1999     Volume: 9 Number: 1193

Today's topics:
        Pulling Client IP configuration (DNS WINS etc) sandman69@my-deja.com
    Re: Pulling Client IP configuration (DNS WINS etc) <rootbeer@redcat.com>
        Pulling out numbers ONLY in a line (Joe Zelwietro)
    Re: Pulling out numbers ONLY in a line (Tad McClellan)
    Re: Pulling out numbers ONLY in a line <dvoon@my-deja.com>
    Re: Pulling out numbers ONLY in a line <rick.delaney@home.com>
        Q: DBI::myql Problem erik_lembke@my-deja.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 27 Oct 1999 13:01:16 GMT
From: sandman69@my-deja.com
Subject: Pulling Client IP configuration (DNS WINS etc)
Message-Id: <7v6t2r$rn0$1@nnrp1.deja.com>

Is there anyway that I can setup a Web page that allows my clients
to connect to and pull their IP configuration and compare
it to the setup that they should be using?
We have migrated to some new servers and I get constant calls on
problems relating to their setups.  Would be nice to have them
learn something for a change.

Information would be their IP address, the WINS servers being used, DNS
servers, DHCP server etc...

Is this possible using a Web Based CGI?

Thanks,
Shawn


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Wed, 27 Oct 1999 11:30:18 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Pulling Client IP configuration (DNS WINS etc)
Message-Id: <Pine.GSO.4.10.9910271127290.29843-100000@user2.teleport.com>

On Wed, 27 Oct 1999 sandman69@my-deja.com wrote:

> Is there anyway that I can setup a Web page that allows my clients
> to connect to and pull their IP configuration and compare
> it to the setup that they should be using?

It sounds as if you want to connect to your clients' computers and request
some information. Yes, this can be done. You'll need to use some protocol
which their machine supports to give you the information. (Of course,
there may not be any such protocol supported for some information; there's
no guarantee that the remote machine will answer your questions.) Such
protocols are beyond the scope of this group. Perhaps you should search
for a newsgroup about the operating systems of the target machines.

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



------------------------------

Date: Mon, 25 Oct 99 21:46:33 GMT
From: deplib@citytel.net (Joe Zelwietro)
Subject: Pulling out numbers ONLY in a line
Message-Id: <3814d0b1@rsl2.rslnet.net>

Hello All:

I'm still trying to find out how to pull numbers ONLY out of a variable.  
Let's say I have a variable $stuff.   

$stuff = "This line has a number 498 in it"

Now how do I pull JUST the number out of it?

I know that \d in a regex matches any digit and 
m/(\d+\.?\d*|\.\d+)/g
will extract all numbers from a string (from the Perl Cookbook)

But I don't know how to use the above to pull 
498
from $stuff

All advice welcome

Joe Zelwietro


------------------------------

Date: Mon, 25 Oct 1999 17:27:13 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Pulling out numbers ONLY in a line
Message-Id: <hvh2v7.gq8.ln@magna.metronet.com>

Joe Zelwietro (deplib@citytel.net) wrote:

: I'm still trying to find out how to pull numbers ONLY out of a variable.  
: Let's say I have a variable $stuff.   

: $stuff = "This line has a number 498 in it"

: Now how do I pull JUST the number out of it?

: But I don't know how to use the above to pull 
: 498
: from $stuff


   $num = $1 if $stuff =~ /(\d+)/;


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


------------------------------

Date: Tue, 26 Oct 1999 02:58:28 GMT
From: dVoon <dvoon@my-deja.com>
Subject: Re: Pulling out numbers ONLY in a line
Message-Id: <7v35cj$6or$1@nnrp1.deja.com>

If there's always only one number in a variable, then:
my $num = ($stuff =~ /\D*(\d+)\D*/);

If there are more then one, then:
my @num = ($stuff =~ /\D*(\d+)\D*/g);

I think you know what to do if you want it to match decimal numbers as
well :)

Have nice day.

Daniel


In article <3814d0b1@rsl2.rslnet.net>,
  deplib@citytel.net wrote:
> Hello All:
>
> I'm still trying to find out how to pull numbers ONLY out of a
variable.
> Let's say I have a variable $stuff.
>
> $stuff = "This line has a number 498 in it"
>
> Now how do I pull JUST the number out of it?
>
> I know that \d in a regex matches any digit and
> m/(\d+\.?\d*|\.\d+)/g
> will extract all numbers from a string (from the Perl Cookbook)
>
> But I don't know how to use the above to pull
> 498
> from $stuff
>
> All advice welcome
>
> Joe Zelwietro
>


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Tue, 26 Oct 1999 03:58:53 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Pulling out numbers ONLY in a line
Message-Id: <3815270F.34F78A55@home.com>

[posted & mailed]

dVoon wrote:
> 
> If there's always only one number in a variable, then:
> my $num = ($stuff =~ /\D*(\d+)\D*/);

Those \D's serve no purpose.  Also that won't work since the assignment
is in a scalar context.

    my ($num) = $stuff =~ /(\d+)/;

> If there are more then one, then:
> my @num = ($stuff =~ /\D*(\d+)\D*/g);

Still serving no purpose.

-- 
Rick Delaney
rick.delaney@home.com


------------------------------

Date: Tue, 26 Oct 1999 15:33:13 GMT
From: erik_lembke@my-deja.com
Subject: Q: DBI::myql Problem
Message-Id: <7v4hjp$5pt$1@nnrp1.deja.com>

Hi folks,

I don't understand following syntaz in the DBI modulde.

if i prepare and execute a insert sql statement like this:

my $in = $dbh->prepare($sql-statement);

$in->execute

following thus not work:

$newindex = $in->insertdid;

but if use thisL

$newindex = $in->{insertid};

it does work well.


Q: What is the difference?
(OK execute is in DBI and insertid is in DBD::mysql, but why i have
to use the anonymous hash reference?????)


cheers Erik






Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 1193
**************************************


home help back first fref pref prev next nref lref last post