Re: What's wrong with this program?

2014-08-06 Thread Jim Gibson
On Aug 6, 2014, at 10:55 AM, ESChamp wrote: > The program begins > > #!/usr/bin/perl You really should add these two lines: use strict; use warnings; here and correct the mistakes they reveal. > use Tie::File; > use File::Copy 'copy'; > use File::Spec; > > my $copy="00-copy.htm"; >

What's wrong with this program?

2014-08-06 Thread ESChamp
The program begins #!/usr/bin/perl use Tie::File; use File::Copy 'copy'; use File::Spec; my $copy="00-copy.htm"; my $recapfile="00recap.txt"; my $htmfile="00.htm"; my $ct; tie my @bfile, 'Tie::File', $recapfile or die "cannot tie recapfile and bfile $!"; tie my @hfile, 'Tie::File',

Re: what's wrong with this mega-widget?

2008-08-08 Thread Rob Dixon
Cort Morgan wrote: > > I'm trying to (learn how to) create a mega-widget in Perl/Tk and am hacking > some examples from "Mastering Perl/Tk". I apparently do not understand how to > use ConfigSpecs. I'm trying to be able to pass arguments to the widget > constructor and define default values if t

what's wrong with this mega-widget?

2008-08-08 Thread Cort Morgan
Hi,   I'm trying to (learn how to) create a mega-widget in Perl/Tk and am hacking some examples from "Mastering Perl/Tk". I apparently do not understand how to use ConfigSpecs. I'm trying to be able to pass arguments to the widget constructor and define default values if the arguments are not s

Re: Following links: What's wrong with me????

2008-04-28 Thread Rob Dixon
Rob Dixon wrote: > > WWW::Mechanize is a subclass of LWP::Useragent Apologies - that should be LWP::UserAgent Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Following links: What's wrong with me????

2008-04-28 Thread Rob Dixon
Li, Jialin wrote: > > On Sun, Apr 27, 2008 at 7:28 AM, J. Peng <[EMAIL PROTECTED]> wrote: >> >> On Sun, Apr 27, 2008 at 2:52 AM, hotkitty <[EMAIL PROTECTED]> wrote: >>> >>> This is my first experience w/ PERL and I've searched everywhere but >>> haven't found the answer. As an example, how do I s

Re: Following links: What's wrong with me????

2008-04-27 Thread Li, Jialin
>From my experience, Mechanize is much easier to use than LWP. On Sun, Apr 27, 2008 at 7:28 AM, J. Peng <[EMAIL PROTECTED]> wrote: > On Sun, Apr 27, 2008 at 2:52 AM, hotkitty <[EMAIL PROTECTED]> wrote: > > This is my first experience w/ PERL and I've searched everywhere but > > haven't found th

Re: Following links: What's wrong with me????

2008-04-27 Thread J. Peng
On Sun, Apr 27, 2008 at 2:52 AM, hotkitty <[EMAIL PROTECTED]> wrote: > This is my first experience w/ PERL and I've searched everywhere but > haven't found the answer. As an example, how do I simply open a > webpage (www.bloomberg.com) then click on each link within that > webpage that contains

Re: Following links: What's wrong with me????

2008-04-27 Thread Jerald Sheets
Have you tried the Perl Module LWP ? You can do conditionals and get LWP to do a lot of that for you. --j On Apr 26, 2008, at 2:52 PM, hotkitty wrote: This is my first experience w/ PERL and I've searched everywhere but haven't found the answer. As an example, how do I simply open a webpa

Following links: What's wrong with me????

2008-04-27 Thread hotkitty
This is my first experience w/ PERL and I've searched everywhere but haven't found the answer. As an example, how do I simply open a webpage (www.bloomberg.com) then click on each link within that webpage that contains "Calpers Chief Buenrostro" and then click on each link in that link that contain

Re: what's wrong with my http header

2007-11-21 Thread Francois
On Nov 21, 2:33 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > Francois wrote: > > I tried to get data from a site which use cookies and redirect the > > user, I spend a lot of time with the same result: connection timed out > > until I realised that all was fine if I did'nt send the header... > > > Th

Re: what's wrong with my http header

2007-11-20 Thread Rob Dixon
Francois wrote: I tried to get data from a site which use cookies and redirect the user, I spend a lot of time with the same result: connection timed out until I realised that all was fine if I did'nt send the header... Thanks for any explanations !!! Francois here is my code: use strict;

Re: what's wrong with my http header

2007-11-20 Thread Tom Phoenix
On 11/20/07, Francois <[EMAIL PROTECTED]> wrote: > what's wrong with my http header You may get a faster, better answer if you ask in a forum concerning http headers and related topics; this forum is for Perl beginners. > I realised that all was fine if I did'nt

what's wrong with my http header

2007-11-20 Thread Francois
I tried to get data from a site which use cookies and redirect the user, I spend a lot of time with the same result: connection timed out until I realised that all was fine if I did'nt send the header... Thanks for any explanations !!! Francois here is my code: use strict; use warnings;

Re: What's wrong with this script?

2006-11-05 Thread John W. Krahn
Tommy Nordgren wrote: > What's wrong with this script for removing the CVS directories from a > checked-out CVS workspace? Are you asking because it is not working correctly? > #!/usr/bin/perl > use strict; > use warnings; > > my $mypath = '/Users/emac/gcc'

Re: What's wrong with this script?

2006-11-05 Thread Travis Thornhill
unlink all the files in it, then call rmdir() on the CVS directory. Try sticking print statements in it to try to see where it's hanging. HTH, - Travis. Tommy Nordgren <[EMAIL PROTECTED]> wrote: What's wrong with this script for removing the CVS directories from a che

Re: What's wrong with this script?

2006-11-05 Thread Tom Phoenix
On 11/5/06, Tommy Nordgren <[EMAIL PROTECTED]> wrote: What's wrong with this script for removing the CVS directories from a checked-out CVS workspace? I don't know. What do you think is wrong with it? Does it do something wrong? Does stepping through it with the debugger gi

What's wrong with this script?

2006-11-05 Thread Tommy Nordgren
What's wrong with this script for removing the CVS directories from a checked-out CVS workspace? #!/usr/bin/perl use strict; use warnings; my $mypath = '/Users/emac/gcc'; removecvs( $mypath); sub removecvs { my $path = $_[0]; system ('/bin/rmdir&

Re: what's wrong with this code?

2006-10-30 Thread Tom Phoenix
On 10/30/06, Octavian Rasnita <[EMAIL PROTECTED]> wrote: I am trying to read a UTF-8 coded file, decode its html character entities, and print it into another UTF-8 coded file. The program works fine if I write the line: $t++; last if $t > 200; What is the largest value you can use, instead

what's wrong with this code?

2006-10-30 Thread Octavian Rasnita
Hi, I am trying to read a UTF-8 coded file, decode its html character entities, and print it into another UTF-8 coded file. The program works fine if I write the line: $t++; last if $t > 200; If I comment that line (for parsing the entire file, and not only the first 200 lines), the program finis

Re: Can someone find out what's wrong ?

2003-05-31 Thread Mark G
Just out of curiosity what kind of cards are you using that you can change the MAC address ?? Mark - Original Message - From: "Nikolay Hristakiev" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 30, 2003 12:36 AM Subject: Can someone find out what&#x

RE: Can someone find out what's wrong ?

2003-05-30 Thread Charles K. Clarkson
Nikolay Hristakiev <[EMAIL PROTECTED]> wrote: : : That is it. : Sorry 4 my broken english : For me seems everything to be Ok but it's not working :< Define "not working". Is it giving you an error? Why not share it with us? Is it producing a result you don't expect? Is it producing more than

Can someone find out what's wrong ?

2003-05-30 Thread Nikolay Hristakiev
I've got a script who looks for change of a MAC-address on LAN cards of my clients and put it in a fail if there is a change. Firts I made static ARP table in /etc/ehters it looks like this - mac address hostname mac address hostname - Afer this make arp -s -f and this is th

Re: what's wrong

2002-08-19 Thread Sudarshan Raghavan
On Thu, 15 Aug 2002, Priss wrote: > I have amended the first few lines, this works but I > wonder if this bad... > > Priss > > while (<>) > { > /(\S+)/ > and $seen_in_file1{$1} += 1; If the line that is being read is of the form word1 word2 $1 will only contain 'word1'.

Re: what's wrong

2002-08-15 Thread Priss
I have amended the first few lines, this works but I wonder if this bad... Priss while (<>) { /(\S+)/ and $seen_in_file1{$1} += 1; push @tmp, $_; } open (FILE, @tmp); while () --- Priss <[EMAIL PROTECTED]> wrote: > > > # compares lines in 2 files, shows

Re: what's wrong

2002-08-15 Thread Priss
> > # compares lines in 2 files, shows set difference > > > > # call as: myprog file1 file2 > > > > while (<>) > > { > > /(\S+)/ and $seen_in_file1{$1} = +1; > > Did you mean $seen_in_file1{$1} += 1; > > When you give the diamond operator it tries to open > all you command > line args a

Re: Cookies, What's wrong with this?

2002-03-03 Thread Johannes Franken
On Sun, Mar 03, 2002 at 07:20:35AM -0500, [EMAIL PROTECTED] wrote: > Could someone tell me why this doesn't retrieve my cookie? > use CGI param, header,cookie; > print header(); > print header(-cookie=>'MY_COOKIE'); header() is for generating an http header, not for reading from it. print cookie(

Cookies, What's wrong with this?

2002-03-03 Thread Motherofperls
Could someone tell me why this doesn't retrieve my cookie? The cookie has already been set by another page and I just want to retrieve it. #!/usr/bin/perl use CGI param, header,cookie; print header(); print header(-cookie=>'MY_COOKIE');

Moving CGI 'param' data into a writable hash [was:: What's wrong with this?]

2002-01-31 Thread Gary Hawkins
> using the Perl4 cgi-lib.pl. However, I can think of no other > legitimate use. Here's a nice, > clean method of dealing with this: > > use strict; > use CGI qw/:standard/; > my %form_data = map { $_, get_data($_) } param; > > sub get_data > { > my $name = shift; >

RE: What's wrong with this?

2002-01-31 Thread Gary Hawkins
> >Fields are all unique. > > Fields are not all unique. > >Chocolate >Vanilla >Strawberry I'm sorry Jeff, I meant that in this case, with this script and set of web pages, the fields are all unique. For real new beginners, note also another relatively common way that field names can

Re: What's wrong with this?

2002-01-31 Thread Curtis Poe
--- Jan Gruber <[EMAIL PROTECTED]> wrote: > Hi ! > > Sorry for the previous posting, im not yet completely awake ;o) > > > > >How can the param's be placed into a new hash? > > > > > > CGI.pm has a Vars() method, I believe, which returns a hash. > > > > > > use CGI; > > > my $q = CGI->new;

RE: What's wrong with this?

2002-01-31 Thread Jeff 'japhy' Pinyan
On Jan 31, Gary Hawkins said: >> >> for $field (param()) { >> >> print "$field => ", param($field), "\n"; >> >> } >> > >> >How can the param's be placed into a new hash? >> >> CGI.pm has a Vars() method, I believe, which returns a hash. >> >> use CGI; >> my $q = CGI->new; >> $data =

Re: What's wrong with this?

2002-01-31 Thread Jan Gruber
Hi, Gary ! On Thursday 31 January 2002 12:16 pm, you wrote: > Thanks, I tried and didn't understand it. Dit it work at all ? > > I think %data = $q->vars would be better to read and I'm not sure if the > > Vars() function returns a reference or a hash. Ok, i'll try A hash is a data comfort

Re: What's wrong with this?

2002-01-31 Thread Jan Gruber
Hi ! Sorry for the previous posting, im not yet completely awake ;o) > > >How can the param's be placed into a new hash? > > > > CGI.pm has a Vars() method, I believe, which returns a hash. > > > > use CGI; > > my $q = CGI->new; > > $data = $q->Vars; > > > > print $data->{field}; # etc

Re: What's wrong with this?

2002-01-31 Thread Jan Gruber
On Thursday 31 January 2002 11:45 am, you wrote: > > >> If you want to loop over all the form fields, you'd do: > > >> > > >> for $field (param()) { > > >> print "$field => ", param($field), "\n"; > > >> } > > > > > >How can the param's be placed into a new hash? > > > > CGI.pm has a Vars(

RE: What's wrong with this?

2002-01-31 Thread Gary Hawkins
> >> If you want to loop over all the form fields, you'd do: > >> > >> for $field (param()) { > >> print "$field => ", param($field), "\n"; > >> } > > > >How can the param's be placed into a new hash? > > CGI.pm has a Vars() method, I believe, which returns a hash. > > use CGI; > my $q

RE: What's wrong with this?

2002-01-29 Thread Brett W. McCoy
On Tue, 29 Jan 2002, Jeff 'japhy' Pinyan wrote: > On Jan 29, Jonathan E. Paton said: > > >> How can the param's be placed into a new hash? > > > >my %hash = param(); > > > >since param() detects whether it's in list/array/hash > >context and does the Right Thing. > > These is no such thing as "ha

RE: What's wrong with this?

2002-01-29 Thread Jeff 'japhy' Pinyan
On Jan 29, Jonathan E. Paton said: >> How can the param's be placed into a new hash? > >my %hash = param(); > >since param() detects whether it's in list/array/hash >context and does the Right Thing. These is no such thing as "hash context" or "array context". There is void context, scalar cont

RE: What's wrong with this?

2002-01-29 Thread Jonathan E. Paton
> > If you want to loop over all the form fields, you'd > > do: > > > > for $field (param()) { > > print "$field => ", param($field), "\n"; > > } > > > > How can the param's be placed into a new hash? my %hash = param(); since param() detects whether it's in list/array/hash context and

RE: What's wrong with this?

2002-01-29 Thread Jeff 'japhy' Pinyan
On Jan 29, Gary Hawkins said: >> If you want to loop over all the form fields, you'd do: >> >> for $field (param()) { >> print "$field => ", param($field), "\n"; >> } > >How can the param's be placed into a new hash? CGI.pm has a Vars() method, I believe, which returns a hash. use CGI

RE: What's wrong with this?

2002-01-29 Thread Gary Hawkins
> If you want to loop over all the form fields, you'd do: > > for $field (param()) { > print "$field => ", param($field), "\n"; > } > How can the param's be placed into a new hash? I'm working with a script that uses a lot of $data{'each_thing'} from %data. I tried replacing all instanc

Re: What's wrong with this?

2002-01-24 Thread Jeff 'japhy' Pinyan
On Jan 24, Eduardo Cancino said: >Japhy, may i call u that way?, in this part... Yes, the name "japhy" is fine -- I prefer its usage as my internet persona, or whatever you'd like to call it. It's easier to remember than my real name, at any rate. ># inicia variables. >> >$to = "info\@domain.m

Re: What's wrong with this?

2002-01-24 Thread Eduardo Cancino
h CGI.pm can I do this a lot easier??? How could I use de CGI.pm, there is a tutorial or something I can read about it??? I don't understand how to use de CPAN. Can you give me any pointers??? Thanks everybody... Lalo. - Original Message - From: "Jeff 'japhy&#x

Re: What's wrong with this?

2002-01-24 Thread Jenda Krynicky
From: "Eduardo Cancino" <[EMAIL PROTECTED]> > Hi everybody! > > The next script runs looks pefectly in IE but in Netscape it shows the > source of the html... A again the stupid M$IE looks like its working even though it should scream ... > > # imprime html. > print < >

Re: What's wrong with this?

2002-01-24 Thread Jeff 'japhy' Pinyan
On Jan 24, Eduardo Cancino said: >The next script runs looks pefectly in IE but in Netscape it shows the >source of the html... That is because IE does things that a browser should not do. ># recibe la forma. >read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); >@pairs = split(/&/, $buffer); Ugh. Y

RE: What's wrong with this?

2002-01-24 Thread Nikola Janceski
should be: # imprime html. print < YOU should use the CGI module.. (makes life very easy!) -Original Message- From: Eduardo Cancino [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 9:25 AM To: [EMAIL PROTECTED] Subject: What's wrong with this? Hi everybody!

What's wrong with this?

2002-01-24 Thread Eduardo Cancino
Hi everybody! The next script runs looks pefectly in IE but in Netscape it shows the source of the html... #!c:/perl/bin/perl.exe # recibe la forma. read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); # inicia variables. $to = "info\@domain.mx"; $from = "info\@domain.mx

RE: What's wrong with this?

2002-01-24 Thread Timothy Johnson
A good mailing list to check out for Win32 Perl questions is the perl-ntadmins list at topica.com. -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 8:13 AM To: Jorge Goncalvez Cc: [EMAIL PROTECTED] Subject: Re:What's wrong with th

Re: What's wrong with this?

2002-01-24 Thread Jon Molin
Jorge Goncalvez wrote: > > Hi, I have this: > #!/usr/local/bin/perl -w > use Win32::Registry; > my $Register ="Software"; > #my $Register2=".DEFAULT\\Software"; > my $hkey; > my @array= qw($HKEY_LOCAL_MACHINE $HKEY_CURRENT_USER ) ; > > foreach (@array) i don't know this windows module but i gue

Re[4]: What's wrong with unlink?

2001-12-04 Thread Maxim Berlin
Hello Tirthankar, Tuesday, December 04, 2001, Tirthankar C. Patnaik <[EMAIL PROTECTED]> wrote: TCP> Hi Maxim, >> no :) you forgot to escape backslash. but there is no difference >> between \ and / slashes in path names in perl for windows. >> TCP> Thanks for this. I use perl on a Linux box, a

Re: Re[2]: What's wrong with unlink?

2001-12-04 Thread Tirthankar C. Patnaik
Hi Maxim, > no :) you forgot to escape backslash. but there is no difference > between \ and / slashes in path names in perl for windows. > Thanks for this. I use perl on a Linux box, and there I use a /. > second, unlink <$_path/*> does not works. > No. here's a small perl prog I wrote to te

Re[2]: What's wrong with unlink?

2001-12-04 Thread Maxim Berlin
Hello Tirthankar, Tuesday, December 04, 2001, Tirthankar C. Patnaik <[EMAIL PROTECTED]> wrote: TCP> You might want to check the permissions of those files. TCP> The command works fine here. TCP> But I guess the mistake is that you're working on Windows, and there you have TCP> a back-slash (

Re: What's wrong in this code

2001-11-08 Thread Etienne Marcotte
oops my bad it's the third time he posts his code and it's different each time :P The one before was for(0..$#array) that's why I told it was the index Etienne "Brett W. McCoy" wrote: > > On Thu, 8 Nov 2001, Etienne Marcotte wrote: > > > because $_ contains the index number only > > > > you

Re: What's wrong in this code

2001-11-08 Thread Brett W. McCoy
On Thu, 8 Nov 2001, Etienne Marcotte wrote: > because $_ contains the index number only > > you need to access the element of the array!!! > > -label=>$_boards[$_], > -value =>$_boards[$_], No, actually, $_ contains the actual item from the array as used in a foreach loop like this. The radio b

Re: What's wrong in this code

2001-11-08 Thread Etienne Marcotte
because $_ contains the index number only you need to access the element of the array!!! -label=>$_boards[$_], -value =>$_boards[$_], Etienne Jorge Goncalvez wrote: > > Hello, i have this: > > open (IPCONF,"< $_Globals{IPCONFIG}") or die "je ne peux ouvrir > $_Globals{IPCONFIG} :$!"; >

Re: HELP!!! What's wrong with my app.??

2001-07-19 Thread Jerry Preston
Jon, This is one way of doing it: use CGI; use CGI::Carp qw(fatalsToBrowser); $query=new CGI; print $query->header(); print $query->start_html( -title=>'tt' ); print $query->startform( -method=>'POST', -name =>'tt'); local( *LOGFILE ); $j = 0; open( LOGFILE, "logfile.txt"

RE: HELP!!! What's wrong with my app.??

2001-07-19 Thread Mark Maunder
Secondary navigation page End_Begin foreach $link (@links) { print < $link End_Row } print < End_Finish # end of program -Original Message- From: Jon Grant [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 19, 2001 3:32 PM To: [EMAIL P

HELP!!! What's wrong with my app.??

2001-07-19 Thread Jon Grant
Hi all, I am a perl beginner and find myself somewhat stuck, please help!! I am trying to write a program that will access a log file that has a list of resource addresses. The program will then create an html page that returns the last address from the log file as a link in an html page. I atta

RE: what's wrong in systax

2001-05-08 Thread King, Jason
icemen to kill all cats running at large. - http://dumblaws.com/ >-Original Message- >From: Jos I Boumans [mailto:[EMAIL PROTECTED]] >Sent: Wed 9 May 2001 09:05 >To: Anshu Anshu; [EMAIL PROTECTED] >Cc: [EMAIL PROTECTED] >Subject: Re: what's wrong in systax > > >

Re: what's wrong in systax

2001-05-08 Thread Jos I Boumans
scaped for the regex. Regards, Jos Bouamns - Original Message - From: "Anshu Anshu" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, May 08, 2001 11:36 PM Subject: Re: what's wrong in systax > Thanks for reply. below is

Re: what's wrong in systax

2001-05-08 Thread Anshu Anshu
f uninitialized value in substitution (s///) at gen_job.pl line 35. Thanks AS - Original Message - From: "Jeff Pinyan" <[EMAIL PROTECTED]> To: "Anshu Anshu" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, May 08, 2001 5:28 PM Subje

Re: what's wrong in systax

2001-05-08 Thread Jeff Pinyan
On May 8, John Joseph Trammell said: >On Tue, May 08, 2001 at 05:24:10PM -0400, Anshu Anshu wrote: >> 22 while () { >> 23 if (/$LOCTAG/i) { >> 24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i; >> 25 $location .= "${curloc}::"; >> 26 } >> 27 >> 28

Re: what's wrong in systax

2001-05-08 Thread Jeff Pinyan
On May 8, Anshu Anshu said: > 22 while () { >23 if (/$LOCTAG/i) { >24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i; >25 $location .= "${curloc}::"; >26 } >27 >28 if (/$TYPETAG/i) { >29 ($curtype) = /VALUE="([^"]+)">/i; >30

Re: what's wrong in systax

2001-05-08 Thread John Joseph Trammell
On Tue, May 08, 2001 at 05:24:10PM -0400, Anshu Anshu wrote: > 22 while () { > 23 if (/$LOCTAG/i) { > 24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i; > 25 $location .= "${curloc}::"; > 26 } > 27 > 28 if (/$TYPETAG/i) { > 29 ($curtyp

what's wrong in systax

2001-05-08 Thread Anshu Anshu
22 while () { 23 if (/$LOCTAG/i) { 24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i; 25 $location .= "${curloc}::"; 26 } 27 28 if (/$TYPETAG/i) { 29 ($curtype) = /VALUE="([^"]+)">/i; 30 $jobtype .= "${curtype}::"; 31