Re: Using map

2002-10-03 Thread Jeff 'japhy' Pinyan
On Oct 3, [EMAIL PROTECTED] said: >I'm having a difficult time understanding the map function. You're having a hard time coping with the fact that $_ is an alias to the values in the list you're mapping over, not a copy. >@new_names = map { ($x = $_) =~ s/(jpg|gif)$/html/i; $x } @old_names; > >

Re: CGI simple but not working - I discovered

2002-10-03 Thread Bruno Negrao - Perl List
Hi all, the problem is that the script is really erroneous. Where you read "q(..." should be "p( ..." The p() function is a part of the CGI.pm modules and stands for a new paragraph. the right script is: #!/usr/bin/perl -w # cgi-bin/ice_cream: program to answer *and generate* ice cream # favorite

Re: WHO IS NAVER-MAILER@naver.com ???

2002-10-03 Thread Tim Musson
Hey eric-perl, My MUA believes you used to write the following on Thursday, October 3, 2002 at 1:38:26 AM. eppn> Every time I send a message to this list, I receive a message from eppn> [EMAIL PROTECTED] immediately afterwards. It appears to be garbage eppn> (lots of screwy character

RE: WHO IS NAVER-MAILER@naver.com ???

2002-10-03 Thread Troy May
I never get them. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 10:38 PM To: Beginners Perl Mailing List Subject: WHO IS [EMAIL PROTECTED] ??? Hello, All: Every time I send a message to this list, I receive a message from [EMA

RE: CGI simple but not working

2002-10-03 Thread nkuipers
I've never used CGI before, I know nothing about it. Offhand though, from looking at your actual versus expected output (opened in new window ;) , I have to wonder if the reason you get a literal "textfield("flavour","mint") is because you have surrounded that statement in your code with a q()

Re: CGI simple but not working

2002-10-03 Thread Bruno Negrao - Perl List
Hello Nathanael and other guys, > First of all, if possible, use the Llama 3rd, not 2nd. It's not... :-( > Second, can you give the expected output and the actual output. I tried to send the pictures to this list but my e-mail was rejected as it grew upon 5 bytes In sumary, this script sh

RE: CGI simple but not working

2002-10-03 Thread nkuipers
I've never used CGI before, I know nothing about it. Offhand though, from looking at your actual versus expected output, I have to wonder if the reason you get a literal "textfield("flavour","mint") is because you have surrounded that statement in your code with a q() structure. In other word

Re: Sockets and Sleep Question

2002-10-03 Thread Jessee Parker
> On Thu, Oct 03, 2002 at 10:10:34AM -0700, Jessee Parker wrote: > > At the top of the loop, I check the system uptime to get the load average > > so I can have the program sleep for 5 seconds to let things stabilize a > > bit. > > I suspect an easier way of doing this would be to nice yourself do

Re: Using map

2002-10-03 Thread George Schlossnagle
Not necessarily prettier: @new = map {m/(.*)(?:jpg|gif)$/i?"$1html":$_ } @old; Karl Kaufman wrote: >I, too, am interested in this syntax. I had to do the same juggling in order to >"map" the values without affecting the original array -- and would prefer cleaner >syntax if it's possible.

RE: CGI simple but not working

2002-10-03 Thread nkuipers
First of all, if possible, use the Llama 3rd, not 2nd. Second, can you give the expected output and the actual output. What platform are you on, what version of perl are you using, etc? Nathanael "Ain't no blood in my body, it's liquid soul in my veins" ~Roots Manuva -- To unsubscribe, e-ma

Re: Using map

2002-10-03 Thread Karl Kaufman
I, too, am interested in this syntax. I had to do the same juggling in order to "map" the values without affecting the original array -- and would prefer cleaner syntax if it's possible. Thx! Karl > @new_names = map { ($x = $_) =~ s/(jpg|gif)$/html/i; $x } @old_names; > > Is there a more el

Re: Sockets and Sleep Question

2002-10-03 Thread Michael Fowler
On Thu, Oct 03, 2002 at 10:10:34AM -0700, Jessee Parker wrote: > At the top of the loop, I check the system uptime to get the load average > so I can have the program sleep for 5 seconds to let things stabilize a > bit. I suspect an easier way of doing this would be to nice yourself down really l

Re: Out of memory on file merge

2002-10-03 Thread Michael Fowler
On Thu, Oct 03, 2002 at 03:04:07PM -0400, Rob Das wrote: > Is there a reasonable check for memory I can use to see what's available > compared to the file size? I don't know of a portable method for checking your memory. However, even if there were a way, why would you want to go that route? I

Re: Using map

2002-10-03 Thread Bob Showalter
- Original Message - From: <[EMAIL PROTECTED]> To: "Beginners Perl Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, October 03, 2002 1:31 AM Subject: Using map > Hello, All: > > I'm having a difficult time understanding the map function. > > I've got an array of file names that all end

RE: Using map

2002-10-03 Thread Robin Cragg
Hi Eric, if you want a more pretty way, (if a touch slower) try: my @new_names = @old_names; foreach (@new_names) { s/\.(jpg|gif)/\.html;i ; } I personally don't like map as I came to PERL from C, but if you want to use it instead... my @new_names = @old_names; map s/\.(jpg|gif)/\.html/i, @new

CGI simple but not working

2002-10-03 Thread Bruno Negrao - Perl List
Hi all, I'm studying the "Learning Perl Second Edition" and I'm learning cgi now. The book presents a sample cgi that doesn't produces the expected result as the book says it would. Could someone test it and say to me if there is something wrong? The following script was retired from the section

WHO IS NAVER-MAILER@naver.com ???

2002-10-03 Thread eric-perl
Hello, All: Every time I send a message to this list, I receive a message from [EMAIL PROTECTED] immediately afterwards. It appears to be garbage (lots of screwy characters...). Where is this coming from? Am I the only one receiving these? -- Eric P. Sunnyvale, CA -- To unsubscribe, e-mai

Using map

2002-10-03 Thread eric-perl
Hello, All: I'm having a difficult time understanding the map function. I've got an array of file names that all end in 'jpg' or 'gif'. I'd like to create a parallel array of file names that end in 'html'. I'm creating the array this way... @new_names = map { ($x = $_) =~ s/(jpg|gif)$/html/i;

Re: The Perl Journal Magazine -- any good?

2002-10-03 Thread Tim Musson
Hey shawn, My MUA believes you used Lotus Notes Release 5.0.8 June 18, 2001 to write the following on Friday, September 27, 2002 at 3:51:32 PM. sgc> Is this a good magazine for someone interested in Perl, or just sgc> for a hard-core user who uses it every day? I would say it is both!

Re: Perl to download files from an AS/400 running OS/400 -- to replace Rumba software

2002-10-03 Thread shawn_milochik
I have the file downloading fine using FTP. Now, I need to convert it from (I believe) binary into ASCII characters. I've been looking at 'binmode' and 'stat $filename', but I don't get a response from 'print "File is binary.\n" if -B;' and the 'binmode HANDLE' results in getting no output if I

RE: Out of memory on file merge

2002-10-03 Thread Rob Das
Thanks for the suggestions. I found out that the user (my boss!) was trying to use this for a really large file... Is there a reasonable check for memory I can use to see what's available compared to the file size? Rob -Original Message- From: Gary Stainburn [mailto:[EMAIL PROTECTED]]

Re: hiding files

2002-10-03 Thread Jenda Krynicky
From: Bryan Harris <[EMAIL PROTECTED]> > Is it possible to set the "hidden" attribute of a file on a Windows > machine using perl? use Win32::File; GetAttributes( $filename, $attr); SetAttributes( $filename, $attr | HIDDEN); We fetch the attributes it has and add HIDDEN.

Re: beginners Digest 3 Oct 2002 18:34:05 -0000 Issue 1177

2002-10-03 Thread Anil Shekhar
Hi ... How do I open the .ezm files? Thx Anil - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 03, 2002 11:34 AM Subject: beginners Digest 3 Oct 2002 18:34:05 - Issue 1177 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

hiding files

2002-10-03 Thread Bryan Harris
Is it possible to set the "hidden" attribute of a file on a Windows machine using perl? TIA. - Bryan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

function Exists

2002-10-03 Thread Janfek Esquivel
Does anyone know how do I use this function or another one to search a valid value on a text file I have from a FORM submitted from an HTML, this value is read from an array because the text file is a database which has all the values sent to the array already mentioned. Attached is the CGI to

Sockets and Sleep Question

2002-10-03 Thread Jessee Parker
I have a program that uses the Mail::Sender module that loops through and gets the names and e-mail addresses out of a MySQL database. At the top of the loop, I check the system uptime to get the load average so I can have the program sleep for 5 seconds to let things stabilize a bit. When

Re: Out of memory on file merge

2002-10-03 Thread Gary Stainburn
On Thursday 03 Oct 2002 5:20 pm, Janek Schleicher wrote: > Rob Das wrote at Thu, 03 Oct 2002 15:01:31 +0200: > > Hi all: > > > > I have a script that is merging many files into a new file, by reading > > one at a time and adding to the new one. The error I received was "Out of > > memory during re

Re: SQUID Log Unix time

2002-10-03 Thread Michael Kelly
On Thu, Oct 03, 2002 at 04:23:19PM +0200, Jasper Wammes wrote: > Hi there, Hi, > I am analizing a Squid proxy log file. The times is like this: > 1033638320.833 > Hoe can i convert that to a normal time? > > Thanks for your time. This should do it, to a certain extent: my $number_time = 10336

Re: Out of memory on file merge

2002-10-03 Thread Janek Schleicher
Rob Das wrote at Thu, 03 Oct 2002 15:01:31 +0200: > Hi all: > > I have a script that is merging many files into a new file, by reading one > at a time and adding to the new one. The error I received was "Out of memory > during request for 1016 bytes, total sbrk() is 1186891848 bytes!" (I did not

Re: Print in colors.

2002-10-03 Thread Jenda Krynicky
From: "Janfek Esquivel" <[EMAIL PROTECTED]> > Does anyone know how do I set the print option to make a text appear > in different colors? Thanks in advance. Erm .. unless you tell us WHERE DO YOU PRINT IT TO we can't help. Jenda === [EMAIL PROTECTED] == http://Jenda.Kr

Re: Print in colors.

2002-10-03 Thread Sudarshan Raghavan
On Thu, 3 Oct 2002, Janfek Esquivel wrote: > Does anyone know how do I set the print option to make a text appear in > different colors? > Thanks in advance. perldoc Term::ANSIColor -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Print in colors.

2002-10-03 Thread Janfek Esquivel
Does anyone know how do I set the print option to make a text appear in different colors? Thanks in advance. _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: SQUID Log Unix time

2002-10-03 Thread Jeff 'japhy' Pinyan
On Oct 3, Jasper Wammes said: >I am analizing a Squid proxy log file. The times is like this: >1033638320.833 >Hoe can i convert that to a normal time? Well, if you don't mind the non-integer portion, 1033638320 represents Thu Oct 3 05:45:20 2002. Use localtime(): my @parts = localtime 1033

Re: SQUID Log Unix time

2002-10-03 Thread Ramprasad A Padmanabhan
Jasper Wammes wrote: > Hi there, > > > I am analizing a Squid proxy log file. The times is like this: > 1033638320.833 > Hoe can i convert that to a normal time? > > Thanks for your time. > > > Greetings > > I think you can afford to ignore the fraction of the second So use @time_array

RE: SQUID Log Unix time

2002-10-03 Thread Bob Showalter
> -Original Message- > From: Jasper Wammes [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 03, 2002 10:23 AM > To: [EMAIL PROTECTED] > Subject: SQUID Log Unix time > > > Hi there, > > > I am analizing a Squid proxy log file. We really don't need to know about your private life.

SQUID Log Unix time

2002-10-03 Thread Jasper Wammes
Hi there, I am analizing a Squid proxy log file. The times is like this: 1033638320.833 Hoe can i convert that to a normal time? Thanks for your time. Greetings -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Perl to download files from an AS/400 running OS/400 -- to replace Rumba software

2002-10-03 Thread shawn_milochik
Is there a Perl module which can be used to download files from an AS/400? We are currently using Rumba software, and we don't want to install it on the machine which we want to use for this project. The Rumba software allows us to create a .rto file, which tells the program the exact format we n

Re: uptime

2002-10-03 Thread Rus Foster
On 3 Oct 2002, chad kellerman wrote: > Hi everyone, > > What would be the easiest way to find the uptime of a linux > machine? I don't want to use a system call. Is there a module I can > use? Or do I have to open /proc/uptime and calculate it thru there? > Prase the output of the command

uptime

2002-10-03 Thread chad kellerman
Hi everyone, What would be the easiest way to find the uptime of a linux machine? I don't want to use a system call. Is there a module I can use? Or do I have to open /proc/uptime and calculate it thru there? Thanks for the help.. Chad -- Chad Kellerman Jr. Systems Administrator Alaban

Out of memory on file merge

2002-10-03 Thread Rob Das
Hi all: I have a script that is merging many files into a new file, by reading one at a time and adding to the new one. The error I received was "Out of memory during request for 1016 bytes, total sbrk() is 1186891848 bytes!" (I did not add the "!"...). This is on a Sun box with 4 Gig, typically

Re: Net::Telnet::Cisco telnet to PIX Firewall

2002-10-03 Thread Robin Cragg
A PIX only allows telnet to the "inside" interface and you have to be listed as a trusted host (telhet ]. Can you telnet i ok yourself from that machine? If that's all ok, I would guess it's a problem with Prompt. Net::Telnet uses a pattern match to determine if it's time to send data, so whe

Weekly list FAQ posting

2002-10-03 Thread casey
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)

make-probs (dynamic)

2002-10-03 Thread jurri
hi,while "make" perl says the following: make[1]: Leaving directory `/static/perl-5.8.0/x2p' Making B (dynamic) Can't figure out your cwd! at ../../lib/ExtUtils/MakeMaker.pm line 229. Warning: No Makefile! make[1]: Entering directory `/static/perl-5.8.0/ext/B' make[1]: *** No rule to m

Re: Placeholder error MySQL

2002-10-03 Thread Jenda Krynicky
From: "Davide Copelli" <[EMAIL PROTECTED]> > I need to execute this query and change the name of the table > > $table1 = 'tab1'; > $table2 = 'tab2'; > $data1 = 'a'; > $data2 = 'b'; > > my $sth = $dbh->prepare(qq|SELECT count(id) FROM ? WHERE data1=? |); > > $sth->execute( $tab

Re: diamond operator

2002-10-03 Thread John W. Krahn
T Kidwai wrote: > > hello everybody, Hello, > i needed some help with the diamond operator (<>) > i am trying to use it in a while like so: > > while(<>){} This reads all the lines from all the files listed in @ARGV and does nothing with them. > @somearray = reverse(@ARGV); This reverses t

file management

2002-10-03 Thread RaghuNath L(Raghu)
We have one log file which are referred by some perl scripts at two locations initially we need to get the log file from location A and append our logs to it at Location B , our changes + original Location A logs+ Location A's appended logs + Location B's changes log at Location B needs to be

Placeholder error MySQL

2002-10-03 Thread Davide Copelli
I need to execute this query and change the name of the table $table1 = 'tab1'; $table2 = 'tab2'; $data1 = 'a'; $data2 = 'b'; my $sth = $dbh->prepare(qq|SELECT count(id) FROM ? WHERE data1=? |); $sth->execute( $table1,$field1 ); $total1=$sth->fetchrow_array(); $sth->execute( $table2,$field2 );

diamond operator

2002-10-03 Thread T Kidwai
hello everybody, i needed some help with the diamond operator (<>) i am trying to use it in a while like so: while(<>){} @somearray = reverse(@ARGV); printf("@somearray"); i run the perlscript with a file suffix like: ./perlscript test1.txt i am trying to reverse the contents of test1.txt line-b

Net::Telnet::Cisco telnet to PIX Firewall

2002-10-03 Thread JasonYahoo
Hi, I am a new perl user. I have problem telnet to Cisco PIX Firewall. Following is my testing perl script. I used net::telnet::cisco module telnet to Cisco routers or switches no problem. But, Cisco PIX Firewall not working. Please give me some advises. use Net::Telnet::Cisco; use strict; m