Re: How to determine if STDIN has piped data?

2004-03-31 Thread Bryan Harris
> Bryan Harris wrote: >> So an example use of a socket would be, say, a script that would listen on a >> socket (?) and notify me in response to a message from a particular cgi >> being executed on my webserver? >> >> I guess I'm not sure where anyone would use this... > > A socket or your exam

Re: How to determine if STDIN has piped data?

2004-03-31 Thread WC -Sx- Jones
Bryan Harris wrote: So an example use of a socket would be, say, a script that would listen on a socket (?) and notify me in response to a message from a particular cgi being executed on my webserver? I guess I'm not sure where anyone would use this... A socket or your example? Your example can be

Re: How to determine if STDIN has piped data?

2004-03-31 Thread Bryan Harris
>> By the way, what's a socket? > > Usually, a network protocol end-point which for most I/O purposes looks > like a file handle. Instead of reading or writing from a file, the > program reads or writes a socket which is typically connected to > another program via a network protocol which is ei

Re: LWP::UserAgent Question

2004-03-31 Thread Oliver Schnarchendorf
On Thu, 1 Apr 2004 09:49:20 +0700, Hari Fajri wrote: > "$ua->credentials($netloc, $realm, $uname, $pass)" > but i do not understand what is $netloc and $realm is... $netloc is the network location. Meaning the http address plus the port the server is running on. $realm i

LWP::UserAgent Question

2004-03-31 Thread Hari Fajri
Hi all i'm new to perl. I'm trying to download file using LWP::UserAgent module from "http://www.abcd.com/thisfile.zip"; but, i need to supply user name & password first before downloading that file. how to do that using LWP::UserAgent? for example, user name = "user" and password = "password"

file operations

2004-03-31 Thread MuthuKumar
Hai All, I have a directory with more files.. Some file contains a pattern as http://yahoo.com/corner_4.gif"; width="10" height="10"> http://yahoo.com/corner_1.gif"; width="10" height="10"> and lot of more lines.. with out the key word yahoo.com I want to change the above line as http://

RE: split

2004-03-31 Thread ewalker
-Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 4:03 PM To: [EMAIL PROTECTED] Subject: Re: split [EMAIL PROTECTED] wrote: > > Hey if I do split like the line below. What is put in options when there are only 3 > . > > ($hello,$good,$e

Re: A long time helper needs help

2004-03-31 Thread Jenda Krynicky
From: <[EMAIL PROTECTED]> > Thanks for your response. Now I can concentrate on how to hack the > code. What what is your take on how to represent the table entries > (cells)? What is the most efficient way to associate each cell with > its parent header? It's a bit hard to give good suggestions

Re: split

2004-03-31 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > Hey if I do split like the line below. What is put in options when there are only 3 > . > > ($hello,$good,$etc,$options) = split /\s/,$line; What happened when you tried it? John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: split

2004-03-31 Thread Jayakumar Rajagopal
it will be undefined. kind of null. and defined( $options) -- will result in false. If you use it in expressions, you will get "". -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 5:37 PM To: [EMAIL PROTECTED] Subject: split Hey if I

split

2004-03-31 Thread ewalker
Hey if I do split like the line below. What is put in options when there are only 3 . ($hello,$good,$etc,$options) = split /\s/,$line; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Matching ranges of IP addresses

2004-03-31 Thread John W. Krahn
James Edward Gray II wrote: > > On Mar 31, 2004, at 3:09 PM, James Edward Gray II wrote: > > > On Mar 31, 2004, at 3:02 PM, James Edward Gray II wrote: > > > >> On Mar 31, 2004, at 2:50 PM, Price, Jason (TLR Corp) wrote: > >> > >>> I am working on a script that searches through a log file, lookin

Re: Is this possible? (file handles)

2004-03-31 Thread John W. Krahn
Jeff Westman wrote: > > Hi, Hello, > I want to remove an empty file using the file handle and not a > variable name or literal name referencing it. Something like this: > > 1 #!/bin/perl > 2 use warnings; > 3 use strict; > 4 no strict 'subs'; > 5 > 6 open(F,

Re: Week Numbers lists

2004-03-31 Thread Mike Blezien
Thx's Paul,.. I caught the %0.2d change right away... thought it looked alittle weired :) alot more elegant that what I original had in place,..works great! ;) Appreciate the help. -- MikeBlezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutio

RE: Week Numbers lists

2004-03-31 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Mike Blezien wrote: > Hello, > > I need to create a dropdown list of week numbers ranging from the > current week number to week number 01. The week number would be > obtain from a MySQL database, IE: select week(curdate()); this equals > 13 > > and from this week#, then I need to generate a lis

Re: Week Numbers lists

2004-03-31 Thread Paul Johnson
On Wed, Mar 31, 2004 at 11:38:56PM +0200, Paul Johnson wrote: > On Wed, Mar 31, 2004 at 03:23:49PM -0600, Mike Blezien wrote: > > > Hello, > > > > I need to create a dropdown list of week numbers ranging from the current > > week number to week number 01. The week number would be obtain from a M

Re: A long time helper needs help

2004-03-31 Thread William.Ampeh
Hello Jenda, Thanks for your response. Now I can concentrate on how to hack the code. What what is your take on how to represent the table entries (cells)? What is the most efficient way to associate each cell with its parent header? That given is: -

Re: Week Numbers lists

2004-03-31 Thread Paul Johnson
On Wed, Mar 31, 2004 at 03:23:49PM -0600, Mike Blezien wrote: > Hello, > > I need to create a dropdown list of week numbers ranging from the current > week number to week number 01. The week number would be obtain from a MySQL > database, IE: select week(curdate()); this equals 13 > > and from

Re: Matching ranges of IP addresses

2004-03-31 Thread Smoot Carl-Mitchell
On Wed, 31 Mar 2004 23:09:28 +0200 Paul Johnson <[EMAIL PROTECTED]> wrote: > On Wed, Mar 31, 2004 at 02:50:30PM -0600, Price, Jason (TLR Corp) > wrote: > > > I am working on a script that searches through a log file, looking > > for IP matches based on several ranges of IPs. I'm trying to find a

RE: Matching ranges of IP addresses

2004-03-31 Thread Price, Jason (TLR Corp)
Thanks to both James and Paul - that solution worked great. Thanks! Jason -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 3:17 PM To: Perl Beginners Cc: Price, Jason (TLR Corp) Subject: Re: Matching ranges of IP addresses On Mar

Week Numbers lists

2004-03-31 Thread Mike Blezien
Hello, I need to create a dropdown list of week numbers ranging from the current week number to week number 01. The week number would be obtain from a MySQL database, IE: select week(curdate()); this equals 13 and from this week#, then I need to generate a list from that week number, IE. 12,11

Re: Matching ranges of IP addresses

2004-03-31 Thread James Edward Gray II
On Mar 31, 2004, at 3:09 PM, James Edward Gray II wrote: On Mar 31, 2004, at 3:02 PM, James Edward Gray II wrote: On Mar 31, 2004, at 2:50 PM, Price, Jason (TLR Corp) wrote: I am working on a script that searches through a log file, looking for IP matches based on several ranges of IPs. I'm tr

Re: Matching ranges of IP addresses

2004-03-31 Thread James Edward Gray II
On Mar 31, 2004, at 3:02 PM, James Edward Gray II wrote: On Mar 31, 2004, at 2:50 PM, Price, Jason (TLR Corp) wrote: I am working on a script that searches through a log file, looking for IP matches based on several ranges of IPs. I'm trying to find a way to do something like this: @results =

Re: Matching ranges of IP addresses

2004-03-31 Thread Paul Johnson
On Wed, Mar 31, 2004 at 02:50:30PM -0600, Price, Jason (TLR Corp) wrote: > I am working on a script that searches through a log file, looking for > IP matches based on several ranges of IPs. I'm trying to find a way > to do something like this: > > @results = grep /192.168.0.[192-254]/, @list >

Re: Matching ranges of IP addresses

2004-03-31 Thread James Edward Gray II
On Mar 31, 2004, at 2:50 PM, Price, Jason (TLR Corp) wrote: I am working on a script that searches through a log file, looking for IP matches based on several ranges of IPs. I'm trying to find a way to do something like this: @results = grep /192.168.0.[192-254]/, @list @results = grep m/192.1

Matching ranges of IP addresses

2004-03-31 Thread Price, Jason (TLR Corp)
I am working on a script that searches through a log file, looking for IP matches based on several ranges of IPs. I'm trying to find a way to do something like this: @results = grep /192.168.0.[192-254]/, @list Which, obviously, doesn't work. Is there any way to specify a range of multi-digit

Re: A long time helper needs help

2004-03-31 Thread Jenda Krynicky
From: <[EMAIL PROTECTED]> > I have a set of tables that look similar to what I have pasted below: > > (See attached file: page6.prn)(See attached file: page7.prn) > > I am trying to organize the contents of these two files, so allow > allows users to query the files. > > > > PS: My initial

Is this possible? (file handles)

2004-03-31 Thread Jeff Westman
Hi, I want to remove an empty file using the file handle and not a variable name or literal name referencing it. Something like this: 1 #!/bin/perl 2 use warnings; 3 use strict; 4 no strict 'subs'; 5 6 open(F, "> abc") or die "cant create file: $!"; 7 cl

A long time helper needs help

2004-03-31 Thread William.Ampeh
Hello, I am currently struggling with this project. I cannot even decide on the best way to implement it, let alone start writing the code. I have a set of tables that look similar to what I have pasted below: (See attached file: page6.prn)(See attached file: page7.prn) I am trying to

Re: (FOUO) PERL question ...

2004-03-31 Thread WC -Sx- Jones
Johnson, Michael wrote: CLASSIFICATION: UNCLASSIFIED SECURITY CONTROL MARKING: FOR OFFICIAL USE ONLY Who offers the very best training in PERL ? Thanks, Mike http://stonehenge.com/ http://training.perl.com/ (Seems slow?) There are MANY... I would mainly say that you should just read a lot at - ht

(FOUO) PERL question ...

2004-03-31 Thread Johnson, Michael
CLASSIFICATION: UNCLASSIFIED SECURITY CONTROL MARKING: FOR OFFICIAL USE ONLY Who offers the very best training in PERL ? Thanks, Mike Classification: UNCLASSIFIED Security Control Marking: FOR OFFICIAL USE ONLY -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

Re: What is happening here

2004-03-31 Thread Jeff 'japhy' Pinyan
On Mar 30, R. Joseph Newton said: >Jeff 'japhy' Pinyan wrote: > >> The main problem is the PRECEDENCE. Your ? : line is run like so: >> >> ((++$count) ? ($count += $count--) : $count) += $count++; > >Have you tested this? I don't see the precedence issue happening here. >Could you try duplicat

Re: gtk problem

2004-03-31 Thread Wiggins d Anconia
> > Hi Sir, > > I have this problem regarding perl. > > Cant figure this out. Hope ypu can help. Thanks. > > > > compile command === > > > [EMAIL PROTECTED] gtk]# perl -c enrollm.pl > > > = error msg ==

Re: Regexp match question !

2004-03-31 Thread Wiggins d Anconia
> Hi everybody, > > > Can someone give me a hint and maybe a source for more > basic dokumentation about reg exp. > perldoc perlretut perldoc perlre The first is in a tutorial style and should be an easier read than the more reference like second. You might also want to pickup "Learning Perl

Re: more on warn .. is next necessary

2004-03-31 Thread Jenda Krynicky
From: Harry Putnam <[EMAIL PROTECTED]> > I wasn't able to really understand perldoc -f warn. > > I'm doing > use File::Find; > open(FILE,"<$File::Find::name")or warn "blah blah: $!"; > > Two things I'm unsure of: > > 1) is the `: $!' meaningfull here? > 2) do I need a `next;' following to make `

Re: How to determine if STDIN has piped data?

2004-03-31 Thread Smoot Carl-Mitchell
On Tue, 30 Mar 2004 21:35:21 -0700 Bryan Harris <[EMAIL PROTECTED]> wrote: > > Please keep in mind that doing this breaks the de facto Unix > > standard for filters. A simply command which is a filter (e.g takes > > input from STDIN and sends output to STDOUT) is written without any > > consider

Re: How Random is Random?

2004-03-31 Thread John W. Krahn
Phil Schaechter wrote: > > The documentation on "keys" and "each" says something like the following: > > --- > Returns a list consisting of all the keys of the named hash. (In scalar > context, returns the number of keys.) The keys are returned in an apparently > random order. > --- > > I have a

Re: Regexp match question !

2004-03-31 Thread John W. Krahn
Daniel Stellwagen wrote: > > Hi everybody, Hello, > I am a beginner of programming ( so I am a beginner of perl programming > too :-) ) and I have this very basic problem but cannot handle it. > > I'm trying to match only a one single digit and wrote this code: > > use strict; > > my $number

Re: Regexp match question !

2004-03-31 Thread WC -Sx- Jones
Daniel Stellwagen wrote: my $number = 11;# two-digit number my $number; while ($number < (5*11)) { ++$number =~ /(\d)(\d)?/; print "Seen $1 and $2 \tby looking at $number\n"; } __END__ HTH/Sx -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: How to determine if STDIN has piped data?

2004-03-31 Thread WC -Sx- Jones
Bryan Harris wrote: By the way, what's a socket? Depends upon network type and OpSys Basically a socket is a place to send data and "not worry" too much about where it went. A pipe (usually a named permanent connection) is set-up between two sockets or two points. You can encrypt data travelin

Re: How Random is Random?

2004-03-31 Thread Bram Mertens
On Tue, 2004-03-30 at 20:48, Phil Schaechter wrote: [...] > If I use keys to select 100 items to process, then come back at a later date > and pick another 100, and so on, will I eventually hit "most" of the items? > > My own experiments show this to be more or less true - but I'd like to know if

gtk problem

2004-03-31 Thread Philip Villamin
Hi Sir, I have this problem regarding perl. Cant figure this out. Hope ypu can help. Thanks. compile command === > [EMAIL PROTECTED] gtk]# perl -c enrollm.pl > = error msg > Can't locate Gtk.pm in

AW: gtk problem

2004-03-31 Thread Schell, Holger
Hi, either u installed the module Gtk.pm wrong or u did not include it in your @INC path... add the path where the Gtk.pm module is stored to your @INC to get the module... BEGIN { unshift (@INC, #path of Gtk.pm); } Best regards, Holger Schell SAP AG, 68789 Rot (Germany) Non-ABAP Production

How Random is Random?

2004-03-31 Thread Phil Schaechter
The documentation on "keys" and "each" says something like the following: --- Returns a list consisting of all the keys of the named hash. (In scalar context, returns the number of keys.) The keys are returned in an apparently random order. --- I have a database (>50,000 items) that I would lik