Re: Match range of array elements?

2001-07-03 Thread Me
>if ($printLine[$state..3] =~ /^/) 1. The syntax $foo[] signifies a single element of array @foo. The . bit is in scalar context and should evaluate to a *single* *numeric* value. Hence the complaint: Argument "" isn't numeric in array element 2. When you use a variable tha

Re: ActivePerl PPM Question

2001-07-03 Thread Joel Divekar
Hi Bill I had faced this problem earlier I don't know why it is not installing the module if downloaded to the local machine but when you are connected to internet and when you try installing, it works properly. I have installed modules from behind proxy / firewall. If you find the solution pl

RE: This Guy Wants help

2001-07-03 Thread Peter Cornelius
Mark-Jason Dominus sent your message to the beginners perl group, which is probably the right place for this kind of question. You can subscribe to the group through lear.perl.org. As for your question, you should look into the Perl DBI set of packages available from CPAN. You can get the docum

Match range of array elements?

2001-07-03 Thread Webster, Murray
To the Perl gurus, It seems to me it should work (although looking in perldoc perlop I can't seen an exact example), but I get:- start quote== Argument "" isn't numeric in array element at D:\perl\scripts\DAMS\modules\RANGECHK.plx line 31, line 2 (#1) (W numeric) The indicat

Re: This guy wants help

2001-07-03 Thread jcowan
Hello This Guy Wants Help, I'm no Perl expert (more of a database guy) but I have used it to play with Sybase. You can use the DBI modules or there is a Sybperl module that is maintained by Michael Peppler. Either one works well and there is a great O'Reilly book on Programming the Perl DBI.

Loops - Killing of Process on Win2k.

2001-07-03 Thread Rajeev Rumale
Hi, I have a win2k server running IIS. Because of some programming error I tend to get caught into some infinit loop while testing the scripts. We know each such request for he script will start a new process for "perl.exe". The process in not dieing by itself after timeout. And also am unable

This guy wants help

2001-07-03 Thread Mark-Jason Dominus
--- Forwarded Message Message-ID: <39DBECB00505D411882F00C04FA06B490353C173@EXCHAPHYD1> From: Bhaskar Reddy <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Help needed. Date: Tue, 3 Jul 2001 15:34:30 +0530 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: mult

Using perl scripts on a non perl win32 machine

2001-07-03 Thread Michael Carmody
Have happily written my script, and it works, then punched myself in the forehead with the realisation I can't use it on all the different workstations i need to. IS there a way to make a win32 activeperl script a binary executable ? Or can I just copy perl.exe and take that and my script on a

Re: Editor

2001-07-03 Thread RL Autry
At 10:14 PM 7/3/2001, Rajeev Rumale wrote: >You must have got many good ones by now. >If not here is one more shareware. http://www.ultraedit.com > >Rajeev Actually all we got was about 4 including yours. Someone on another list told me about GNU Emacs. I need to find out what this one is. Did

Re: Editor

2001-07-03 Thread Rajeev Rumale
You must have got many good ones by now. If not here is one more shareware. http://www.ultraedit.com Rajeev ~~~ Rajeev Rumale MyAngel.Net Pte Ltd.,Phone : (65)8831530 (office) #04-01, 180 B,

RE: Editor

2001-07-03 Thread Peter Mueller
editplus. :) > -Original Message- > From: Kris G Findlay [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 03, 2001 2:59 PM > To: Beginners perl; [EMAIL PROTECTED] > Subject: RE: Editor > > > > i use synedit its free and very good !! check out www.mkidesign.com or > http://synedit.hyper

Re: Editor

2001-07-03 Thread Tim Musson
Hey Bill, Tuesday, July 03, 2001, 3:33:42 PM, my MUA believes you used Microsoft Outlook Express 5.50.4522.1200 to write: BP> May I get some suggestions for any Windows-based PERL development BP> tools? Preferably, free ones? I like Vim www.vim.org and TextPad www.textpad.com. Both have conte

Compiler

2001-07-03 Thread RL Autry
The question came up. Is a compiler even needed with Perl? Someone just told us you don't compile it, and that is one of the advantages to it. Thanks, RL

RE: Editor

2001-07-03 Thread RL Autry
We are very new to programming and especially to Perl. We were following this thread closely and only saw a couple of replies. Wondering if there are any other editors that would do all that is needed for Perl and possibly even C++, Java, Visual Basic, ect The reason for this is we are actually at

Re: Getopt::STD

2001-07-03 Thread Michael Fowler
On Tue, Jul 03, 2001 at 07:13:58PM -0500, [EMAIL PROTECTED] wrote: > I've read through > http://search.cpan.org/doc/JHI/perl-5.7.1/lib/Getopt/Std.pm I wouldn't suggest using this as your reference for core Perl modules. You should use perldoc on the command-line, or failing that, www.perldoc.com

RE: pointers to subs?

2001-07-03 Thread Tony Cook
On Tue, 3 Jul 2001, Jeff 'japhy' Pinyan wrote: > None, unless 'login' or 'authent' were one of: > > q qq qr qw qx s m y tr > > Those can't be auto-quoted with => (unless 5.6.1 has changed that). bash$ perl -v | grep version This is perl, version 5.004_04 built for i686-linux bash$ perl -le '

Getopt::STD

2001-07-03 Thread charles
I've read through http://search.cpan.org/doc/JHI/perl-5.7.1/lib/Getopt/Std.pm and it seems as though the following syntax should work: getopt("nh",\%option); however, it does not. when i use getopts rather than getopt getopts("nh",\%option); it does work. did i misread the cpan page that i re

Re: Help !

2001-07-03 Thread Paul Johnson
On Tue, Jul 03, 2001 at 03:57:54PM -0700, Amir Hejazi wrote: > I just wanted to save people some time. > To answer your question, I have been in 2 perl programming classes and doing > some light > perl scripting for couple of years to do my sysadmin tasks. > Now , I need to send a file which is ge

Re: Help !

2001-07-03 Thread Paul Johnson
On Tue, Jul 03, 2001 at 03:12:30PM -0700, Amir Hejazi wrote: > In other words I need the actual code in a perl to send /etc/hosts to a > user. You'll find lots of people here who are willing to spend time helping you to learn Perl, but I don't know that you'll find any who will be willing to jus

Help !

2001-07-03 Thread Amir Hejazi
Friends, Perl on Solaris question. I need a simple example with actual codes to use sendmail and send an existing file, i.e. /etc/hosts to an address i.e. [EMAIL PROTECTED] , from within a perl program. In other words I need the actual code in a perl to send /etc/hosts to a user. Thanks ... Amir

Re: error

2001-07-03 Thread Chas Owens
"perldoc perlport" has a lot of good info about cross platform Perl. On 03 Jul 2001 17:12:46 -0500, RL Autry wrote: > At 03:13 PM 7/3/2001, Jeff 'japhy' Pinyan wrote: > >You did something like: > > > > require "uid"; > > > >I don't know why. > > > This was originally on a UNIX machine. > How

pack function

2001-07-03 Thread Jia Fu Cen
Hi: Anybody know how the '@' parameter works for the pack function? Specifically, I'm looking to use the function to pack integer values (short's and long's too). A few good examples would be greatly appreciated. Thanks, Jia Fu

Re: error

2001-07-03 Thread RL Autry
At 03:13 PM 7/3/2001, Jeff 'japhy' Pinyan wrote: >You did something like: > > require "uid"; > >I don't know why. This was originally on a UNIX machine. How can you know when you have a script that will work with your operating system? In this case Windows2000 Server. Thanks, RL

RE: Editor

2001-07-03 Thread Kris G Findlay
i use synedit its free and very good !! check out www.mkidesign.com or http://synedit.hypermart.net -Original Message- From: Luke Bakken [mailto:[EMAIL PROTECTED]] Sent: 03 July 2001 20:35 To: Bill Pierson Cc: [EMAIL PROTECTED] Subject: Re: Editor www.vim.org On Tue, 3 Jul 2001, Bill

RE: Reference found where even-sized list expected

2001-07-03 Thread Grant McLean
> From: Pozsar Balazs [mailto:[EMAIL PROTECTED]] > > I get this warning: > Reference found where even-sized list expected at ./n.pl line 94. Plenty of people have given you translations of the error message, hopefully changing the curly brackets to round brackets has fixed your problem. I just

Re[4]: A Split Question

2001-07-03 Thread Maxim Berlin
Hello Brett, Tuesday, July 03, 2001, Brett W. McCoy <[EMAIL PROTECTED]> wrote: >> >> > > > Unpack works well with fixed format data like this. >> >> > > >> >> > > Why would you use unpack when this can be easily split apart with a regex? >> >> > > I'd think unpack would be overkill! >> >> >> >>

Re: Windows2000

2001-07-03 Thread Bryan DeLuca
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Check out. http://www.webdav.org - From the site: WebDAV stands for "Web-based Distributed Authoring and Versioning". It is a set of extensions to the HTTP protocol which allows users to collaboratively edit and manage files on remote web servers

Re: error

2001-07-03 Thread Jeff 'japhy' Pinyan
On Jul 3, RL Autry said: >Can someone go here and tell me what this error message means in English? >I am still learning Perl, English I know --- well kinda --- LOL CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

Re: Windows2000

2001-07-03 Thread Chas Owens
Hit "reply to all". Also consider removing the other addresses. On 03 Jul 2001 14:45:20 -0500, RL Autry wrote: > At 05:15 AM 7/3/2001, Aaron Craig wrote: > > ie, you've got nothing to worry about :) > > Thanks Aaron that helps more than you know. > > I keep replying to these posts but it is n

Re: error

2001-07-03 Thread Jos I. Boumans
means you have either 'use uid' or 'require uid' or something of the like in your script at line 3 check it for errors... Jos - Original Message - From: "RL Autry" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 03, 2001 9:55 PM Subject: error > Can someone go here and

RE: Reference found where even-sized list expected

2001-07-03 Thread Ross, Jonathan C.
> I get this warning: > Reference found where even-sized list expected at ./n.pl line 94. > > when running my script, and i don't understand what does it mean. > Please explain. Here are the relevant lines: > > 94: my %args = { > 95: descriptor => "/usr/lib/nitro/all.xml", > 96:

error

2001-07-03 Thread RL Autry
Can someone go here and tell me what this error message means in English? I am still learning Perl, English I know --- well kinda --- LOL http://www.cyberdzyns.com/cgi-bin/wsearch.pl Thanks, RL

Re: Windows2000

2001-07-03 Thread Casey West
On Tue, Jul 03, 2001 at 02:45:20PM -0500, RL Autry wrote: : At 05:15 AM 7/3/2001, Aaron Craig wrote: : > ie, you've got nothing to worry about :) : : Thanks Aaron that helps more than you know. : : I keep replying to these posts but it is not going to the list. : It is going to the individual w

Re: Reference found where even-sized list expected

2001-07-03 Thread Brett W. McCoy
On Tue, 3 Jul 2001, Brett W. McCoy wrote: > You are using braces where you should be using parentheses. The curly > braces are used when you are creating an anonymous hash, as you do > correctly for the binddir key. Sorry, I meant the build key. :-) -- Brett

Re: Editor

2001-07-03 Thread Luke Bakken
www.vim.org On Tue, 3 Jul 2001, Bill Pierson wrote: > Hello again, all. > > May I get some suggestions for any Windows-based PERL development tools? Preferably, >free ones? > > Thanks, > --Bill > >

Re: Windows2000

2001-07-03 Thread RL Autry
At 11:38 AM 7/3/2001, Bryan DeLuca wrote: > Since FrontPage extended >servers support DAV and DAV is a standardized extension to HTTP (It is also >used by the Windows Web Folders feature) you might consider using DAV to >transfer your files. What does DAV stand for and how do I use it? RL

Re: Editor

2001-07-03 Thread Tyler Longren
Context is my choice: http://www.fixedsys.com/context/ Tyler - Original Message - From: "Bill Pierson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 03, 2001 2:33 PM Subject: Editor Hello again, all. May I get some suggestions for any Windows-based PERL development t

Re: Windows2000

2001-07-03 Thread RL Autry
At 05:15 AM 7/3/2001, Aaron Craig wrote: > ie, you've got nothing to worry about :) Thanks Aaron that helps more than you know. I keep replying to these posts but it is not going to the list. It is going to the individual who sent it. People have suggested that I reply to the list so I can get

Editor

2001-07-03 Thread Bill Pierson
Hello again, all. May I get some suggestions for any Windows-based PERL development tools? Preferably, free ones? Thanks, --Bill

Re: Reference found where even-sized list expected

2001-07-03 Thread Brett W. McCoy
On Tue, 3 Jul 2001, Pozsar Balazs wrote: > I get this warning: > Reference found where even-sized list expected at ./n.pl line 94. > > when running my script, and i don't understand what does it mean. > Please explain. Here are the relevant lines: > > 94: my %args = { > 95: descriptor =>

Re: Problem with llama book script

2001-07-03 Thread Jos I. Boumans
you might want to avoid the complexity here and just say: open(GRADES, "grades.txt"); your problem are the \ marks... you'll need to use \\ in your example, seeing that \ is the escape character iirc, you can use / in perl paths too, even on a windows machine, but i'm not 100% on that one. try i

Re: Reference found where even-sized list expected

2001-07-03 Thread Paul
--- Pozsar Balazs <[EMAIL PROTECTED]> wrote: > > hi again, > > I get this warning: > Reference found where even-sized list expected at ./n.pl line 94. It usually means you're using {} instead of () to assign hash values. =o) > when running my script, and i don't understand what does it mean.

Reference found where even-sized list expected

2001-07-03 Thread Pozsar Balazs
hi again, I get this warning: Reference found where even-sized list expected at ./n.pl line 94. when running my script, and i don't understand what does it mean. Please explain. Here are the relevant lines: 94: my %args = { 95: descriptor => "/usr/lib/nitro/all.xml", 96:

Re: Problem with llama book script

2001-07-03 Thread Francis Henry
i'm a newbie too, but try this- use slashes instead of backslashes, perl sees backslashes as escapes, so this: open(GRADES, "c:\perl\eg\grades.txt") or die "Can't open grades: $!\n"; should be: open(GRADES, "c:/perl/eg/grades.txt") or die "Can't open grades: $!\n"; lemme know if that helps! Cu

Problem with llama book script

2001-07-03 Thread Customer Service
O enlightened ones, here is my question: I am going through the llama book (which, by the way, is the most useful tool I have bought so far for perl reference) in order to learn perl. On page 10 is a simple script which I copied and have attempted to execute for the last 1/2 hour. Please tell m

Re: quotation marks

2001-07-03 Thread Jeff 'japhy' Pinyan
On Jul 3, Paul said: >> NOTE: -foo is a NOT bareword. The unary - before that which WOULD be >> a bareword makes it NOT a bareword. Correction: -foo is NOT a bareword. It is a unary - in front of a bareword. >From perlop: Unary "-" performs arithmetic negation if the operand is num

Executing Script from Sendmail

2001-07-03 Thread David Rankin
Hello, I am trying to write a script that is run by piping email to it from an alias. The script is running on Red Hat Linux 7.0, and the MTA's sendmail. I'm also using smrsh. I'm not sure if the problem is with the script or something else, but here's the code I'm using (just for testing righ

Re: MYSQL

2001-07-03 Thread Chas Owens
On 04 Jul 2001 01:45:23 -0400, Ryan Gralinski wrote: > My mail got all deleted by accident can someone please tell me the site > that had info on Databases (mysql) and accesing them from perl. > > RYan > > > Luckily for you there is an archive of the list on the web: http://archive.develooper

Re: quotation marks

2001-07-03 Thread Paul
--- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Jul 3, Paul said: > > >> > foo => 'bar' > >> > 'foo' => 'bar' > >> > >> And are they the same as: > >> > >> "foo" => "bar" > >> 'foo' => "bar" > > > >Those aren't the same. > >"$foo" is very different from '$foo' > >I think => d

MYSQL

2001-07-03 Thread Ryan Gralinski
My mail got all deleted by accident can someone please tell me the site that had info on Databases (mysql) and accesing them from perl. RYan

Re: quotation marks

2001-07-03 Thread Jeff 'japhy' Pinyan
On Jul 3, Paul said: >> > foo => 'bar' >> > 'foo' => 'bar' >> >> And are they the same as: >> >> "foo" => "bar" >> 'foo' => "bar" > >Those aren't the same. >"$foo" is very different from '$foo' >I think => does interpolative double-ish quoting, doesn't it? => does no interpolation.

Re: :Telnet

2001-07-03 Thread Vrunda Prabhu
Thanks, I will look at the documents you point to right away. Even though the task may not be for abeginner, I do not have too much of a choice, so I will dig in. Thanks Vrunda On 3 Jul 2001 [EMAIL PROTECTED] wrote: > > "Prabhu" == Prabhu, Vrunda P (UMC-Student) <[EMAIL PROTECTED]> writes:

Re: pointers to subs?

2001-07-03 Thread Jos I. Boumans
For completeness, the arrow stringifies LHS *almost* always... If your keys start with a number, but also have other characters following them, or are just completely 'odd' (ie, \W), you must quote them. For example: %foo = ( "34foo" => "bar" ); or even %foo = ( '#)$*.#@' => "bar" ); note that

RE: help on perl/tk

2001-07-03 Thread IMutlu
Hey, When I ran it on windows machine with activestate perl, both frames looked the same. Do they change size when you fill up the Listboxes? Also use a loop for your radiobuttons, less code: #Radiobuttons foreach (qw/Smarpiece Deckbuild Scholar Discovery Tonyplot Devedit/){ $prod_frame-

Re: quotation marks

2001-07-03 Thread Paul
--- Pozsar Balazs <[EMAIL PROTECTED]> wrote: > > The => (fat arrow) auto-quotes the left-hand operand as long as > it's a > > bareword. > > > > foo => 'bar' > > > > is the same as > > > > 'foo' => 'bar' > > And are they the same as: > > "foo" => "bar" > 'foo' => "bar" > ... > and so on?

RE: pointers to subs?

2001-07-03 Thread Paul
--- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Jul 3, John Edwards said: > > >It's messy and relies on you naming you subroutines to match the > static data > >stored in %funcs. It will introduce more possible points of failure > in the > >code, make it harder to debug and maintain. Unl

Re: pointers to subs?

2001-07-03 Thread Michael Fowler
On Tue, Jul 03, 2001 at 01:12:34PM -0400, Brett W. McCoy wrote: > Nothing. If you use the => operator, quotes around the keys are not > required. Quotes are also not required when using single word keys hwne > retrieving a value: With => quotes around the keys are not -always- required. The qu

Re: :Telnet

2001-07-03 Thread Vrunda Prabhu
What if I have a variable like 'state' (for example) which I set to 1 when a telnet connection is requested. Within the cgi, I have a while loop that keeps the telnet connection open while 'state' is 1. The value of 'state' would be changed by the cgi. Does this sound as a right direction? I a

RE: pointers to subs?

2001-07-03 Thread Brett W. McCoy
On Tue, 3 Jul 2001, Pozsar Balazs wrote: > What's the difference between these two?: > > %actions = ( > login => \&welcome, > authent => \&checkpass, > ); > and > %actions = ( > "login" => \&welcome, > "authent" => \&checkpass, > ); Nothing. If you use the => operator, q

RE: pointers to subs?

2001-07-03 Thread Brett W. McCoy
On Tue, 3 Jul 2001, John Edwards wrote: > It's messy and relies on you naming you subroutines to match the static data > stored in %funcs. It will introduce more possible points of failure in the > code, make it harder to debug and maintain. Unless you've got a really good > reason why you need t

Re: pointers to subs?

2001-07-03 Thread Brett W. McCoy
On Tue, 3 Jul 2001, Pozsar Balazs wrote: > I would want to use a hash to keep pointers to functions, and then call > them, but i'm stuck. > So: > > I create: > my %funcs=( > "one"=> \&first, > "two"=> \&second); > > Then how can I call 'first'? Obviously, using %funcs,

RE: pointers to subs?

2001-07-03 Thread Pozsar Balazs
> The => (fat arrow) auto-quotes the left-hand operand as long as it's a > bareword. > > foo => 'bar' > > is the same as > > 'foo' => 'bar' And also my experiences show that this auto-quotation applies for {}'s as well: $hash{"element"} is the same as $hash{element} ?. Balazs Pozsar. --

Re: pointers to subs?

2001-07-03 Thread Paul Johnson
On Tue, Jul 03, 2001 at 06:49:29PM +0200, Pozsar Balazs wrote: > What's the difference between these two?: > > %actions = ( > login => \&welcome, > authent => \&checkpass, > ); > and > %actions = ( > "login" => \&welcome, > "authent" => \&checkpass, > ); Redundant punctu

quotation marks

2001-07-03 Thread Pozsar Balazs
> The => (fat arrow) auto-quotes the left-hand operand as long as it's a > bareword. > > foo => 'bar' > > is the same as > > 'foo' => 'bar' And are they the same as: "foo" => "bar" 'foo' => "bar" ... and so on? pozsy --

RE: pointers to subs?

2001-07-03 Thread Jeff 'japhy' Pinyan
On Jul 3, Pozsar Balazs said: > %actions = ( >login => \&welcome, >authent => \&checkpass, > ); > >and > > %actions = ( >"login" => \&welcome, >"authent" => \&checkpass, > ); None, unless 'login' or 'authent' were one of: q qq qr qw qx s m y tr Those can't be auto-quoted

Re: Variable Scope

2001-07-03 Thread Jeff 'japhy' Pinyan
On Jul 3, Michael Dube said: >I tried scoping the variable to the parent by calling it >parent::$log->write... no luck. > parent::$log->write("Got Here"); Variables are made up of a sigil ($, @, %, &, *), an optional namespace (CGI::, main::, :: (which is main::)), and the symbol name (foo

RE: pointers to subs?

2001-07-03 Thread Pozsar Balazs
Hi all, here's my next question :) What's the difference between these two?: %actions = ( login => \&welcome, authent => \&checkpass, ); and %actions = ( "login" => \&welcome, "authent" => \&checkpass, ); bye Balazs Pozsar. --

RE: pointers to subs?

2001-07-03 Thread Jeff 'japhy' Pinyan
On Jul 3, John Edwards said: >It's messy and relies on you naming you subroutines to match the static data >stored in %funcs. It will introduce more possible points of failure in the >code, make it harder to debug and maintain. Unless you've got a really good >reason why you need to do this, I'd

Re: pointers to subs?

2001-07-03 Thread Jeff 'japhy' Pinyan
On Jul 3, Pozsar Balazs said: >my %funcs=( >"one"=> \&first, >"two"=> \&second); > >Then how can I call 'first'? Obviously, using %funcs, i mean :). There are two (general) ways to dereference arrays, hashes, and functions: CREATE REFERENCEARROW SYNTAXSIGIL

RE: pointers to subs?

2001-07-03 Thread John Edwards
Err, why?? Try this my %funcs=( "one"=> \&first, "two"=> \&second, ); sub first { print "First"; } sub second { print "Second"; } &{$funcs{'one'}}; It's messy and relies on you naming you subroutines to match the static data stored in %funcs. It will introduce more p

Variable Scope

2001-07-03 Thread Michael Dube
Ok... can someone give me a clue about the issue of variable scoping? I have a program that uses a logging module (Log::LogLite), and so I have an object $log that has a ->write method. I have a few custom packages that I wrote that I want to be able to also write to the logfile. What is the syn

Re: defining a new line seperator

2001-07-03 Thread Pozsar Balazs
$/ is the var for this, so you should say: $/="\n\n"; have a nice day. On Tue, 3 Jul 2001 [EMAIL PROTECTED] wrote: > i'd like to define a new line separator as a simple blank line. i have > tried \n\n and even tried ^$ in the way of a regex, but to no avail. is > there a metacharacter specif

defining a new line seperator

2001-07-03 Thread charles
i'd like to define a new line separator as a simple blank line. i have tried \n\n and even tried ^$ in the way of a regex, but to no avail. is there a metacharacter specific to this? -cjm

pointers to subs?

2001-07-03 Thread Pozsar Balazs
Hi all, I would want to use a hash to keep pointers to functions, and then call them, but i'm stuck. So: I create: my %funcs=( "one"=> \&first, "two"=> \&second); Then how can I call 'first'? Obviously, using %funcs, i mean :). thanks, Balazs Pozsar. --

Re: Re[2]: A Split Question

2001-07-03 Thread Luke Bakken
> > >> > > > Unpack works well with fixed format data like this. NB: *fixed format* - i.e. unchanging throughout the data. > the flexibility of a regular expression. If the date style changes to, > say, 02July01 (instead of 2July2001), the regula

Re: Windows2000

2001-07-03 Thread Bryan DeLuca
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Your admin's concern is with the indexing infomation and "Webbot" configuration information that FrontPage keeps in _vti* directories that might possibly be overwritten or not updated. Since FrontPage extended servers support DAV and DAV is a stan

Re: :Telnet

2001-07-03 Thread Gary Stainburn
Hi Vrunda, I won't say that what you want can't be done, but it will be very hard. Because of the way http and CGI work there is not 'state' between connections. As far as the web server's concerned, each connection is a new connection, and after it's finished providing your content it stops

Re: Re[2]: A Split Question

2001-07-03 Thread Jeff 'japhy' Pinyan
On Jul 3, Maxim Berlin said: > my ($month, $day, $year) = /(\d+)(\D+)(\d+)/; I'd be evil and do: my ($mon, $day, $yr) = split /(\D+)/; Now *that* is quite nice, in my opinion. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ I am Marillion, the wielder of Rin

Telnet again

2001-07-03 Thread Vrunda Prabhu
Folks I sent a message earlier asking for help on using Net::Telnet. I thought, I'd include my coe in a message. I would like the telnet session to stay open till the user decides otherwise. Any help is always appreciated. Thanks Vrunda MY CODE AT PRESENT: #!/usr/bin/perl use CGI qw/:stand

Re: Re[2]: A Split Question

2001-07-03 Thread Brett W. McCoy
On Tue, 3 Jul 2001, Maxim Berlin wrote: > Tuesday, July 03, 2001, Brett W. McCoy <[EMAIL PROTECTED]> wrote: > > >> > > > Unpack works well with fixed format data like this. > >> > > > >> > > Why would you use unpack when this can be easily split apart with a regex? > >> > > I'd think unpack would

RE: Perl 2 EXE or other problem?

2001-07-03 Thread John Edwards
Check out the Perl2Exe documentation. It's covered in there. If that doesn't help, mail the writer of Perl2Exe. I've had to do that before and found him to respond quickly and he was very helpful. http://www.indigostar.com/pxman.htm John -Original Message- From: Stout, Joel R [mailto:[E

Re: A Split Question

2001-07-03 Thread Jos Boumans
on a side note, if you CAN use perls internal char classes you really want to do that firstly to avoid typos, secondly, they're much faster. and if you're using the same regexp over and over again, you *might* want to concider building it outside the loop with the /o switch (this all performace b

Perl 2 EXE or other problem?

2001-07-03 Thread Stout, Joel R
I have the following in my script: use Mail::Sender; When using Perl2Exe I get the following error: Warning: module Mail/Sender.config.pm not found After install of Perl2Exe I ran the sample and it did fine. The Perl script runs without warnings and I use (-w; use strict;). I am using Win32.

Re[2]: A Split Question

2001-07-03 Thread Maxim Berlin
Hello Brett, Tuesday, July 03, 2001, Brett W. McCoy <[EMAIL PROTECTED]> wrote: >> > > > Unpack works well with fixed format data like this. >> > > >> > > Why would you use unpack when this can be easily split apart with a regex? >> > > I'd think unpack would be overkill! >> >> why is it overkill

RE: ActivePerl PPM Question

2001-07-03 Thread Conrad, Bill (ThomasTech)
Hi Adrian I had a corrupt version of ppm. I re-installed and it works. Thanks Bill Conrad -Original Message- From: Ichim, Adrian [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 03, 2001 11:12 AM To: Conrad, Bill (ThomasTech) Subject: RE: ActivePerl PPM Question You may have s

Re: A Split Question

2001-07-03 Thread Brett W. McCoy
On Tue, 3 Jul 2001, Luke Bakken wrote: > > > > Unpack works well with fixed format data like this. > > > > > > Why would you use unpack when this can be easily split apart with a regex? > > > I'd think unpack would be overkill! > > why is it overkill any more that a regex? Are you saying we shou

Re[2]: ActivePerl PPM Question

2001-07-03 Thread Tim Musson
Hey Bill, I have never grabbed the .zip files from ActiveState. I always just run PPM and let it get the files... I believe you can do it manually, I just have never had a reason to try. At a guess, you may have problems locating the .ppm file? Tuesday, July 03, 2001, 10:53:38 AM, my MUA beli

RE: Re: A Sort Hash Question

2001-07-03 Thread paul
Thanks Japhy... I can see where you are going with this, we convert the month into a number, and then sort the dates as a string. My dates are the second keys of a hash of hashes. So I have routine like: foreach $firstkey (keys %hoh) { foreach $thedate (keys %{ $hoh { $firstkey }} ) {

Re: A Split Question

2001-07-03 Thread Pierre Smolarek
err.. make that "sleep better" kinda got side tracked with work :} - Original Message - From: "Pierre Smolarek" <[EMAIL PROTECTED]> To: "John Edwards" <[EMAIL PROTECTED]>; "'Will Crain'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, July 03, 2001 3:59 PM Subject: Re: A Split Q

Re: A Split Question

2001-07-03 Thread Pierre Smolarek
I stand by my reply to this post. Sure, unpack is quicker. But if you use regex, i always prefer to use my own defined regex's my $dateis = "2Jul2001"; my ($date,$month,$year) = $dateis =~ /([0-9]+)([A-Za-z]+)([0-9]+)/; It makes me sleeper at night - Original Message - From: "John Edwa

RE: A Split Question

2001-07-03 Thread John Edwards
Sorry to pick holes in your first post to the list ;) but this part of your suggested regex (\w{3,}) will match any alphanumeric character (i.e it will match on the numbers or letters in the string). By limiting it to three places, you force the match to work. It's not good practice tho

RE: ActivePerl PPM Question

2001-07-03 Thread Conrad, Bill (ThomasTech)
HI Tim Yes, I downloaded the Tk.zip file from ActiveState not CPAN and got this error. Thanks Bill Conrad -Original Message- From: Tim Musson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 03, 2001 10:42 AM To: [EMAIL PROTECTED] Subject: Re: ActivePerl PPM Question He

Log file creation

2001-07-03 Thread Tim Musson
perlpeople, Is it better to open a log file only when I need to write to it, or open it at the start, and close when done? A few thousand lines in the log... -- [EMAIL PROTECTED] Using The Bat! eMail v1.53d Windows NT 5.0.2195 (Service Pack 1) When in doubt, think.

Re: ActivePerl PPM Question

2001-07-03 Thread Tim Musson
Hey Bill, Tuesday, July 03, 2001, 10:05:47 AM, my MUA believes you used Internet Mail Service (5.5.2653.19) to write: CBT> Hi All CBT> Has anyone used ActivePerl's Perl Package Manager to install CPAN CBT> packages? I down loaded the Tk package and I am trying to install it locally CBT>

RE: A Split Question

2001-07-03 Thread Will Crain
-- Original Message -- >My file has dates in it that either come out as "2Jul2001" or "21Jul2001". > So one or two digits for the day, three for the month, and four for the >year. > >So I would like to split out the day, month, year, and am interested in >splitting techniques, where there are n

Re: changing Unix Passwd

2001-07-03 Thread Maxim Berlin
Hello Tarik, Tuesday, July 03, 2001, Tarik Jeait <[EMAIL PROTECTED]> wrote: TJ> can somebody tell me how to change my unix passwd by a perl TJ> script: TJ> open(FILE,"|passwd"); --> doesn't work ; TJ> must I open some pipe or What ? on linux - man usermod on freebsd - man pw on ... - man

Re: A Split Question

2001-07-03 Thread Luke Bakken
> > Unpack works well with fixed format data like this. > > Why would you use unpack when this can be easily split apart with a regex? > I'd think unpack would be overkill! > > -- Brett if you had thousands of dates to split up, unpack is much faster than regexes. way way faster. Luke

Re: changing Unix Passwd

2001-07-03 Thread Brett W. McCoy
On Tue, 3 Jul 2001, Tarik Jeait wrote: > can somebody tell me how to change my unix passwd by a perl script > : > > open(FILE,"|passwd"); --> doesn't work ; > > must I open some pipe or What ? You'll want to use the Expect module, which can be used to automate interactive tasks like this.

Re: A Split Question

2001-07-03 Thread Brett W. McCoy
On Tue, 3 Jul 2001, Luke Bakken wrote: > my @dates = qw(2Jul2001 21Jul2001); > > for my $date (@dates) > { > my ($month, $day, $year) = > length $date == 8 ? > unpack 'AA3A4', $date : > unpack 'A2A3A4', $date; > >

RE: Multiple files in a filehandle

2001-07-03 Thread Jeff 'japhy' Pinyan
On Jul 3, mark crowe (JIC) said: > open FILEHANDLE "file1" + "file2"; > while () {do stuff} This is specifically what @ARGV and <> are good for. ;) >Test code that duplicates the problem: > @ARGV = qw(test1 test2); > for $i(0..9) {$array[$i] = <>} > print @array;

  1   2   >