Re: css attributes in CGI

2002-09-27 Thread Janek Schleicher
Jimmy George wrote at Fri, 27 Sep 2002 00:36:42 +0200: When we use commands such as $q-p(some line of text); when doing prints, is there any way of giving the output attributes such as we can with css descriptors? e.g. $q-p({-style = 'color: red; font-size: 24pt'}, some line of

Mail::MboxParser

2002-09-27 Thread Margaret
Hi I'm trying to get some examples for this module but cannot find any. Can someone please send me a simple example. I want to extract the headers and body of the messages and also be able to delete the messages. Thanks Margaret -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

pop-up window with database access

2002-09-27 Thread Jim Lundeen
Hello, I'm creating a web site for our department at my school. We have a sign-up form for a society that people can join. I want to create a MySQL database of university names and allow the user to click on a Lookup button on the sign-up form when they get to the field University Affiliation

RE: checking parameters ...

2002-09-27 Thread Anurag K. Singh
use or instead of like : if (($ARGV[0] eq ) or ($ARGV[1] eq ) or ($ARGV[2] eq )) { print You must give me 3 parameters\n; exit } It works for me. Thanks Anurag Kumar Singh AMDOCS DEVELOPMENT LTD. Limassol , Cyprus. Phone: +357-25-845384(O) -Original Message- From:

Searching Storing

2002-09-27 Thread Henry Wong
Hi all, I am wondering if you guys can help me out here: I have a log file containing information like this: THU DEC 6 14:55:00 2001111222333444 FRI DEC 7 01:00:00 2001 555666777888 SAT DEC 8 13:00:00 2001xxxxxxxxxxxx SUN DEC 9 04:00:00 2001xxx

RE: Hide a string while saving it to file

2002-09-27 Thread NYIMI Jose (BMB)
-Original Message- From: david [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 8:41 PM To: [EMAIL PROTECTED] Subject: Re: Hide a string while saving it to file Nyimi Jose wrote: I have a string (ascii). I would like to apply a rule on it before saving it to

RE: checking parameters ...

2002-09-27 Thread Sudarshan Raghavan
On Fri, 27 Sep 2002, Anurag K. Singh wrote: use or instead of like : if (($ARGV[0] eq ) or ($ARGV[1] eq ) or ($ARGV[2] eq )) { print You must give me 3 parameters\n; exit } It works for me. 1) If I were to use your program how would I pass an empty string as an

Can't load libraries

2002-09-27 Thread pierre . michaud
Hello, I'm working with perl 5.6.1 on HP-UX. I met a little problem when I tried to use a Tibco specific library: I have 3 library, the first one can be used successfully but the two other create an error: Can't load '/opt/TeSCX100L04D/perl/lib/site_perl/5.6.1/PA-RISC2.0-thread-

Re: Or Syntax

2002-09-27 Thread Janek Schleicher
Lance Prais wrote at Fri, 27 Sep 2002 01:55:31 +0200: If a=b or a=c or a=d do this How would I do that? I thought I could do it like this but it did not work. 1. If ($a=b) || ($a=c) || ($a=d) { DO this } 2. If ($a=b) || if ($a=c) || if ($a=d) { DO this } If there are

Port listener problem

2002-09-27 Thread Theocharous, Amrit
-Original Message- From: Theocharous, Amrit Sent: 27 September 2002 09:51 To: [EMAIL PROTECTED] Subject: All, Can't see to get this right. # Connect to my port... Works fine! $ClientSocket = new IO::Socket::INET ( PeerAddr = '166.12.121.47', PeerPort = $SendPort, Proto

How to catch a string in parameters?

2002-09-27 Thread Admin-Stress
I want to make a script to print parameter-1, parameter-2, and parameter-3. Parameter-1 and parameter-2 just a SINGLE word. Parameter-3 = string. #!/usr/bin/perl $p1=$ARGV[0]; $p2=$ARGV[1]; $p3=$ARGV[2]; print $p1 $p2 $p3 Then, I test it like this: ./myscript word word this is

Re: Hide a string while saving it to file

2002-09-27 Thread John W. Krahn
Nyimi Jose wrote: From: david [mailto:[EMAIL PROTECTED]] sub fix_it{ my $s = shift; $s =~ s#(.)#chr(ord($1)/2)#ge; I did know that it was possible to use # character instead of the / one, while substution. I understand why you use it :-) (because of division

Re: file last modified

2002-09-27 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hi, i wonder how i can get only the files that are modified less than a hour for exemple in a directory. How can i do this in Perl? Use stat or lstat to get the mtime and compare it to the current time. The times used are in seconds so one hour would be 3600

Re: How to catch a string in parameters?

2002-09-27 Thread Dharmender Rai
I don't know what problem you are facing as the following code runs properly: #! /usr/bin/perl use strict; use warnings; my $var1=$ARGV[0]; my $var2=$ARGV[1]; my $var3=$ARGV[2]; print var1 is $var1\n var2 is $var2 \n var3 is $var3\n; Now when you give : how is that working? it prints: var1

newbie - in

2002-09-27 Thread Kyle Babich
Does Perl have an in operator or something similar? If not how would I find out if a certain list has a certain element? Thank you, -- Kyle -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: newbie - in

2002-09-27 Thread Timothy Johnson
check out perldoc -f grep -Original Message- From: Kyle Babich [mailto:[EMAIL PROTECTED]] Sent: Friday, September 27, 2002 4:34 AM To: beginners Subject: newbie - in Does Perl have an in operator or something similar? If not how would I find out if a certain list has a certain

Faster way to go to a line in a file

2002-09-27 Thread Rowe, Sean D.
Right now, to get to a certain line number, I will open the file, set a for loop to get a line until line number is reached, and then quit. Is there a faster way? ex: for (my $i = 1; $i = $LineNumber; $i++) { $Line = $FileHandle-getline; } Thanks. Sean --

Is there a way to get the previous line in a file?

2002-09-27 Thread Rowe, Sean D.
I need a function, like getline, which gets the previous line. I'm thinking I've read somewhere how to do this, but I can't remember where. Anyone know? Sean -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Read a file directly from system call?

2002-09-27 Thread Rowe, Sean D.
I think, when you use system(), that you're expecting something it's not going to give you. I found this out trying to use grep. I said my $Value = system(grep -l somevalue somefile) and the return was always 0. I found, though, that instead of using system, use the '`' character:

Replacing string

2002-09-27 Thread Zary Necheva
Hi, I have a file with this data: ..CITY/STATE. |aBalt., MD ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBaltimore, Md ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBaltimore, Maryland ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBaltimore, MD ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBALTIMORE, Md ..COUNTY.

HOW TO POST II

2002-09-27 Thread [EMAIL PROTECTED]
Hello tony You gave me en grat answer on how to post but now i got another problem I post alright using this code: use LWP::UserAgent; $url=http://www.google.com.br/search?q=$quehl=ptlr=ie=UTF-8oe=UTF-8sta rt=10sa=N; $age=Mozilla/4.0 (compatible; MSIE 6.0; Windows 98); my $lwp =

How to get file version?

2002-09-27 Thread Le, Ha (OPB)
I read in a filename but I don't know how get the file version out of the file. It seems Perl stat() doesn't work this way. Anybody knows what Perl function or module will work? Thanks, HL -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

creating string

2002-09-27 Thread tim martin
My problem, is getting the script to write a thread, to an htm,html,or even txt document. Question...Seeing what I have,which is suppose to work; Do you see a problem with it, or know of another way to print a link to a referanced page? print Pragma: no-cache\n; if($redirect ($redirect

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Michael Kelly
On Thu, Sep 26, 2002 at 09:38:18PM -0300, Bruno Negrao - Perl List wrote: Hi, Hi Bruno, I'm triyng to open the /etc/aliases.db file for reading with the dbmopen function - the result is that I can't open the file for reading, or something like this. yes, I have permission because I'm root.

Re: Hide a string while saving it to file

2002-09-27 Thread ANIDIL RAJENDRAN
Try this to encode your file. Decoding I beleive you can do. open (FILE, C:\\perl\\original\.txt ) or die ; open (FILE1,C:\\perl\\converted\.txt) or die ; while (FILE) { @ascii = unpack(C*, $_); foreach $val (@ascii) { $val++; } $_ = pack(C*, @ascii); print FILE1; } close(FILE);

Re: newbie - in

2002-09-27 Thread Sudarshan Raghavan
On Fri, 27 Sep 2002, Kyle Babich wrote: Does Perl have an in operator or something similar? If not how would I find out if a certain list has a certain element? Read through perldoc -q 'How can I tell whether a certain element is contained in a list or array?' -- To unsubscribe, e-mail:

RE: newbie - in

2002-09-27 Thread Sudarshan Raghavan
On Fri, 27 Sep 2002, Timothy Johnson wrote: check out perldoc -f grep grep should not be used for this purpose, it will run through the entire list even after the desired element has been found. -Original Message- From: Kyle Babich [mailto:[EMAIL PROTECTED]] Sent: Friday,

Regarding decrementing IV_MIN(Integer minimum)

2002-09-27 Thread Geeta Kathpalia, Noida
Hello all I am executing the following perl code(using 5.8.0): $a = -9223372036854775808; $a--; if ($a == -9223372036854775807) { print ok \n; } The output which

Comparison: finding if a value is gt some value AND lt another

2002-09-27 Thread eric-perl
Hello, All: Is there a simple way to find if a variable's value is within a range? e.g., if (1 $x 5) { print 'foo'; } or do I have to join two separate comparisons using the logical AND operator? e.g., if (1 $x and $x 5) { print 'foo'; } -- Eric P. Sunnyvale, CA -- To

Re: Replacing string

2002-09-27 Thread Dharmender Rai
your regexp for aBalt (aBalt*) is not correct. It is taking into account aBaltimore also. Instead , you should have written aBalt\.* --- Zary Necheva [EMAIL PROTECTED] wrote: Hi, I have a file with this data: ..CITY/STATE. |aBalt., MD ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBaltimore,

Re: Regarding decrementing IV_MIN(Integer minimum)

2002-09-27 Thread Janek Schleicher
Geeta Kathpalia wrote at Fri, 27 Sep 2002 13:57:29 +0200: I am executing the following perl code(using 5.8.0): $a = -9223372036854775808; $a--; if ($a == -9223372036854775807) { print ok \n;

Re: Replacing string

2002-09-27 Thread Sudarshan Raghavan
On Thu, 26 Sep 2002, Zary Necheva wrote: Hi, I have a file with this data: ..CITY/STATE. |aBalt., MD ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBaltimore, Md ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBaltimore, Maryland ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBaltimore, MD ..COUNTY.

Re: Replacing string

2002-09-27 Thread Sudarshan Raghavan
On Fri, 27 Sep 2002, Dharmender Rai wrote: your regexp for aBalt (aBalt*) is not correct. It is taking into account aBaltimore also. Instead , you should have written aBalt\.* Your regex says the string 'aBalt' followed by 0 or more '.'. This should be 'aBalt.*' -- To unsubscribe,

Re: Is there a way to get the previous line in a file?

2002-09-27 Thread Janek Schleicher
Sean D. Rowe wrote at Thu, 26 Sep 2002 21:26:54 +0200: I need a function, like getline, which gets the previous line. I'm thinking I've read somewhere how to do this, but I can't remember where. Anyone know? Use a variable holding always the last line: my $previous_line = undef; while (my

Re: Replacing string

2002-09-27 Thread Janek Schleicher
Zary Necheva wrote at Thu, 26 Sep 2002 21:36:35 +0200: I have a file with this data: ..CITY/STATE. |aBalt., MD ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBaltimore, Md ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBaltimore, Maryland ..COUNTY. |aBALTIMORE ..CITY/STATE. |aBaltimore, MD

Re: Faster way to go to a line in a file

2002-09-27 Thread Janek Schleicher
Sean D. Rowe wrote at Thu, 26 Sep 2002 20:54:49 +0200: Right now, to get to a certain line number, I will open the file, set a for loop to get a line until line number is reached, and then quit. Is there a faster way? ex: for (my $i = 1; $i = $LineNumber; $i++) {

Realtime output to the browser

2002-09-27 Thread Mark Schouten
Hi, I'm writing some code to autmatically retrieve a file if the local file is older than a day. I would like to output some data to the browser while this script is running instead of waiting untill the script is done. Here's the code: if (-M $file = 1) { print

Re: Port listener problem

2002-09-27 Thread Bob Showalter
- Original Message - From: Theocharous, Amrit [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 27, 2002 4:53 AM Subject: Port listener problem -Original Message- From: Theocharous, Amrit Sent: 27 September 2002 09:51 To: [EMAIL PROTECTED] Subject: All,

RE: Faster way to go to a line in a file

2002-09-27 Thread Rowe, Sean D.
Where can I find the Tie module on cpan? I'm not sure where to look for. My perl distribution doesn't have it loaded, and my system administrator is gone. Sean -Original Message- From: Janek Schleicher [mailto:[EMAIL PROTECTED]] Sent: Friday, September 27, 2002 6:41 AM To: [EMAIL

RE: Faster way to go to a line in a file

2002-09-27 Thread Rowe, Sean D.
never mind, i found it. -Original Message- From: Rowe, Sean D. [mailto:[EMAIL PROTECTED]] Sent: Friday, September 27, 2002 8:40 AM To: Janek Schleicher; [EMAIL PROTECTED] Subject: RE: Faster way to go to a line in a file Where can I find the Tie module on cpan? I'm not sure where to

Re: Comparison: finding if a value is gt some value AND lt another

2002-09-27 Thread Jeff 'japhy' Pinyan
On Sep 27, [EMAIL PROTECTED] said: Is there a simple way to find if a variable's value is within a range? e.g., if (1 $x 5) { print 'foo'; } You can't do that until Perl 6. or do I have to join two separate comparisons using the logical AND operator? e.g., if (1 $x and $x 5) {

Re: How to get file version?

2002-09-27 Thread Jeff 'japhy' Pinyan
On Sep 26, Le, Ha (OPB) said: I read in a filename but I don't know how get the file version out of the file. It seems Perl stat() doesn't work this way. Anybody knows what Perl function or module will work? How are you defining a file version? -- Jeff japhy Pinyan [EMAIL PROTECTED]

Net::POP3 ping method Help

2002-09-27 Thread Steve Gilbert
Does anyone have any experience using the ping method from Net::POP3? I've included the following code, after running I get Cannot get ping stats: #/usr/bin/perl -w use Net::POP3; $pop = Net::POP3-new($mail_server) or die Can't connect $!\n; defined ($pop-login($user)) or die Can't login $!\n;

code to parse out HTML tags

2002-09-27 Thread shawn_milochik
I have some code that I've been working on. I know it will be painfully obvious to you that I'm not very experienced yet with Perl, because I know I'm not taking advantage of the full text-processing power it has. What I want to do is to read an HTML file and find all occurrences of an

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
Hi Michael, the problem is not with the undef value - undef is fine - if you read the dbmopen's documentation you could see it. If I choose a value like 0644 the script still doesn't work. Bellow, is the output of the execution of the same program, but with 0644 in place of undef: Uncaught

RE: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread nkuipers
Uncaught exception from user code: No aliases!: Invalid argument at ./zz line 3. Well you have three arguments. If you are *sure* that the undef is not the problem, that leaves only two to possibly be invalid. To start, try battening down the hatches with use strict, predeclaring

Re: output to console and to logfile.

2002-09-27 Thread Jenda Krynicky
From: Peter Lemus [EMAIL PROTECTED] I have a scripts that prints to a log file. I would like to receive all messages on my terminal also when the script runs. Please enlight me...thanks. You may want to look at IO::Tee (on CPAN) or Local::TeeOutput (

Re: code to parse out HTML tags

2002-09-27 Thread Jenda Krynicky
From: [EMAIL PROTECTED] I have some code that I've been working on. I know it will be painfully obvious to you that I'm not very experienced yet with Perl, because I know I'm not taking advantage of the full text-processing power it has. What I want to do is to read an

RE: File::Find

2002-09-27 Thread Jenda Krynicky
From: David Samuelsson (PAC) [EMAIL PROTECTED] Yes, this is what i found out aswell. So how do i go around this problem? should i try using another tactic? The script deletes all files first , that alters the -M on the directory, which means i have to delete the directoy first? but i

Re: system call troubles...

2002-09-27 Thread david
Chris wrote: # ** ** # print Trying to Run -- system $playerApp ($webCast):\n; # system $playerApp, ($webCast); # ** ** # ** ** print Trying to Run -- exec $playerApp $webCast:\n; exec $playerApp, ($webCast); # ** ** system() is basically just a fork(), exec(), wait() so if

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
Thank you nkuipers for answering. I already tried declaring variables with my, i already checked the path, i tested the hash with another name - all this doesn't make difference. To me, it seems that my /etc/aliases.db in written in a format uncompatible with the dbmopen(). I'm on the 17

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
Thank you nkuipers for answering. I already tried declaring variables with my, i already checked the path, i tested the hash with another name - all this doesn't make difference. To me, it seems that my /etc/aliases.db in written in a format uncompatible with the dbmopen(). I'm on the 17

Re: system call troubles...

2002-09-27 Thread Jenda Krynicky
From: david [EMAIL PROTECTED] Chris wrote: # ** ** # print Trying to Run -- system $playerApp ($webCast):\n; # system $playerApp, ($webCast); # ** ** # ** ** print Trying to Run -- exec $playerApp $webCast:\n; exec $playerApp, ($webCast); # ** ** system() is

Re: Or Syntax

2002-09-27 Thread david
Lance Prais wrote: If I wanted to say: If a=b or a=c or a=d do this How would I do that? don't use '=' for comparison, sue '==' for numeric comparison and 'eq' for string I thought I could do it like this but it did not work. 1. If ($a=b) || ($a=c) || ($a=d) { DO this } the

Re: code to parse out HTML tags

2002-09-27 Thread Janek Schleicher
Shawn Milochik wrote at Fri, 27 Sep 2002 16:44:52 +0200: I have some code that I've been working on. I know it will be painfully obvious to you that I'm not very experienced yet with Perl, because I know I'm not taking advantage of the full text-processing power it has. What I want to do

Postgres Select

2002-09-27 Thread Rob
Hi, I'm working on a script that has to find if there is a customer number in one table that's not in the other. My first thought was to write all customer numbers out to a file then sort them and go through the first file one line at a time while going completly through the other file each

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread david
Bruno Negrao - Perl List wrote: Hi Michael, the problem is not with the undef value - undef is fine - if you read the dbmopen's documentation you could see it. If I choose a value like 0644 the script still doesn't work. Bellow, is the output of the execution of the same program, but with

Re: output to console and to logfile.

2002-09-27 Thread david
Peter Lemus wrote: Hi, folks, I have a scripts that prints to a log file. I would like to receive all messages on my terminal also when the script runs. Please enlight me...thanks. The scripts looks something like this... #MAIN #--- open

Re: Postgres Select

2002-09-27 Thread Jenda Krynicky
From: Rob [EMAIL PROTECTED] Hi, I'm working on a script that has to find if there is a customer number in one table that's not in the other. My first thought was to write all customer numbers out to a file then sort them and go through the first file one line at a time

PPM trouble !

2002-09-27 Thread NYIMI Jose (BMB)
I'm trying to install perl modules (DBI actually ...) for windows using PPM. My connection is via proxy and I have set HTTP_proxy , HTTP_user and HTTP_pass variables ... When I type the ppm command : search * I got the following messages: Searching in repository 1 (ActiveState Package

Re: newbie - in

2002-09-27 Thread david
Kyle Babich wrote: Does Perl have an in operator or something similar? If not how would I find out if a certain list has a certain element? Thank you, -- Kyle simply loop through the list or array you have and see if you can find what you are looking for: my @i = ( 1..100 ); my $found

re: autoftp

2002-09-27 Thread William Black
Hello All, Does anyone know if perl offers an autoftp module? If they do what is it and how does it work. Cheers, William Black _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe,

RE: newbie - in

2002-09-27 Thread Nikola Janceski
And who would care if the list always remains small enough that it wouldn't make a difference? use grep, if you notice a performance issue at that command then it's time to think of other methods of doing your operation (hint hashes). Personally I avoid making giant arrays, heck I aviod too much

problem with overlapping matches and while m//g

2002-09-27 Thread nkuipers
Hello, I am trying to get the positions of every instance of a given substring within a given superstring (DNA sequence), and currently have a while ( $super_string =~ m/${sub_string}/gi ) { ... } construct. I was under the impression that the regex transmission would bump along every

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
Ok david. Could you send me a code example of a database file being opened for reading with tie? thanks, bnegrao. - Original Message - From: david [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 27, 2002 2:41 PM Subject: Re: dbmopen can't open /etc/aliases.db file

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread david
Bruno Negrao - Perl List wrote: Ok david. Could you send me a code example of a database file being opened for reading with tie? thanks, bnegrao. use NDBM_File; tie(%HIST, 'NDBM_File', '/usr/lib/news/history', 1, 0); while (($key,$val) = each %HIST) { print $key, ' = ',

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
Yeah it worked! I simply changed the '/usr/lib/news/history' for '/etc/aliases' and the script showed the file contents. But, why? Why dbmopen didn't work? thanks, Bruno. - Original Message - From: david [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 27, 2002 3:49 PM

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread david
Bruno Negrao - Perl List wrote: Yeah it worked! I simply changed the '/usr/lib/news/history' for '/etc/aliases' and the script showed the file contents. But, why? Why dbmopen didn't work? thanks, Bruno. dbmopen defaults to NDBM so if tie works, chances are that dbmopen should work as

Re: autoftp

2002-09-27 Thread Bruno Negrao - Perl List
Yes. Exist the Net::FTP module. The following text comes from the Oreilly's book Perl in a Nutshell 16.2 Net::FTP Net::FTP is used to transfer files from remote hosts. Using Net::FTP, you can write simple FTP clients that transfer files from remote servers based on information passed on the

Problem installing A module

2002-09-27 Thread Lance Prais
I am trying to install Quantum::superpostitions and am getting an erroe and can not understands it. When I type perl Makeflie.pl It works correctly But when I type Make test I get the following error and everthing appears to be in the correct place. Can't locate Class/Multimethods.pm in @INC

Re: Problem installing A module

2002-09-27 Thread david
Lance Prais wrote: I am trying to install Quantum::superpostitions and am getting an erroe and can not understands it. When I type perl Makeflie.pl It works correctly But when I type Make test I get the following error and everthing appears to be in the correct place. Can't locate

foreach() and while()

2002-09-27 Thread eric-perl
Hello, All: When using foreach or while() on an array, how can I access the index of the list that foreach()/while() is working upon? Is there an internal variable that stores this info like PHP's current()? -- Eric P. Sunnyvale, CA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: foreach() and while()

2002-09-27 Thread James Edward Gray II
If you need this, I suggest using the good old fashioned for ($i = 0; $i END; $i++) { }. Nothing broken there, I don't think. James On Thursday, September 26, 2002, at 11:12 PM, [EMAIL PROTECTED] wrote: Hello, All: When using foreach or while() on an array, how can I access the index

The Perl Journal Magazine -- any good?

2002-09-27 Thread shawn_milochik
Is this a good magazine for someone interested in Perl, or just for a hard-core user who uses it every day? Shawn ** This e-mail and any files transmitted with it may contain confidential information and is intended solely

module for manipulating text file

2002-09-27 Thread Admin-Stress
Hi, Anyone know which module should I use to manipulate text file (like /etc/passwd for example). I meant, to read a line, search a string, deleting a line, etc. My objective is to manage /etc/passwd via perl script (later via web interface). Right now, I can create a user by calling

Re: foreach() and while()

2002-09-27 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hello, All: Hello, When using foreach or while() on an array, how can I access the index of the list that foreach()/while() is working upon? Is there an internal variable that stores this info like PHP's current()? No, Perl doesn't have a variable like that, you

module for manipulating text file

2002-09-27 Thread Admin-Stress
Hi, Anyone know which module should I use to manipulate text file (like /etc/passwd for example). I meant, to read a line, search a string, deleting a line, etc. My objective is to manage /etc/passwd via perl script (later via web interface). Right now, I can create a user by calling

Re: The Perl Journal Magazine -- any good?

2002-09-27 Thread Paul Johnson
On Fri, Sep 27, 2002 at 03:51:32PM -0400, [EMAIL PROTECTED] wrote: Is this a good magazine for someone interested in Perl, or just for a hard-core user who uses it every day? It used to be an excellent magazine for all sorts of Perl users. Hopefully it will become so again. -- Paul Johnson

Re: foreach() and while()

2002-09-27 Thread Paul Johnson
On Fri, Sep 27, 2002 at 01:40:09PM -0700, John W. Krahn wrote: [EMAIL PROTECTED] wrote: When using foreach or while() on an array, how can I access the index of the list that foreach()/while() is working upon? Is there an internal variable that stores this info like PHP's current()?

Re: Searching Storing

2002-09-27 Thread david
Henry Wong wrote: Hi all, I am wondering if you guys can help me out here: I have a log file containing information like this: THU DEC 6 14:55:00 2001111222333444 FRI DEC 7 01:00:00 2001 555666777888 SAT DEC 8 13:00:00 2001xxxxxxxxxxxx SUN

Re: problem with overlapping matches and while m//g

2002-09-27 Thread david
Nkuipers wrote: Hello, I am trying to get the positions of every instance of a given substring within a given superstring (DNA sequence), and currently have a while ( $super_string =~ m/${sub_string}/gi ) { ... } construct. I was under the impression that the regex transmission

need little help with reg expressions

2002-09-27 Thread David Mamanakis
Again... interesting little routine I have going... Sucking a return out of a function an stuffing it into an array @Junk = $TE-logon($A-{USERID}); Then I am validating the information in the array with known values, searching for specific information... if

Re: need little help with reg expressions

2002-09-27 Thread david
David Mamanakis wrote: sub validateCLSMSResponse { my $self = shift; my $Response = undef; my $CheckString = shift; my @Holder = shift; the above could be bad. you only shift one element from @Junk into @Holder. If you have: @Junk = ('hi','hello','whatever','another');

State Variables

2002-09-27 Thread Grant Hansen
Can anyone provide an example of how to use a state variable to break out of a loop? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Quick ?

2002-09-27 Thread Grant Hansen
What is the ! doing in this statement? $quit = 0; while (! $quit) Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Regarding decrementing IV_MIN(Integer minimum)

2002-09-27 Thread Geeta Kathpalia, Noida
Thanks for the reply Janek. If the number is converted to float, then as the result shows, the number is truncated a bit, from -9223372036854775808 to -9.22337203685478e+18. If yes, then how come printf ok %f, $a; still gives the correct

Re: module for manipulating text file

2002-09-27 Thread Dharmender Rai
you would be interested in this : [1] http:[EMAIL PROTECTED]/msg00028.html [2] --- Admin-Stress [EMAIL PROTECTED] wrote: Hi, Anyone know which module should I use to manipulate text file (like /etc/passwd for example). I meant, to read a line, search a string, deleting a line, etc. My

Re: Quick ?

2002-09-27 Thread John W. Krahn
Grant Hansen wrote: What is the ! doing in this statement? $quit = 0; while (! $quit) That is the logical not operator. It says 'loop while $quit is not true (false)' where not true is either undef, 0, '0' or ''. It could also be written as: until ( $quit ) { Read about this and other

Re: State Variables

2002-09-27 Thread John W. Krahn
Grant Hansen wrote: Can anyone provide an example of how to use a state variable to break out of a loop? Can you provide an example or explanation of what you are trying to do? John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,