Re: Curses::UI: No definition found for '< Yes >'

2006-07-11 Thread Mumia W.
Chasecreek Systemhouse wrote: > On 7/10/06, Mumia W. <[EMAIL PROTECTED]> wrote: >> I'm trying to learn to use Curses::UI, and I read the top of "perldoc >> Curses::UI" and found some example code. Unfortunately, it doesn't work. >> This is my program: >> >> #!/usr/bin/perl >> >> use strict; >> us

Specify download file name

2006-07-11 Thread Anish Kumar K.
Hi This is somewhat easy question I feel but for some reason I am not getting this The issue is I am using CGI to download a file, I am setting the header as this print $cgiObject->header(-type=>'application/zip',-charset=>'',-Expires=>'-1d',-'Cache-Control'=>'private, max-age=0'); the do

RE: Specify download file name

2006-07-11 Thread Nagasamudram, Prasanna Kumar
Hi Anish Can you try adding the following to your $cgiObject->header ? -attachment=>'$filename.zip', And changing -type=>'application/zip' to -type=>'application/octet-stream' [PS : The above is not tested] Thanks Prasanna -Original Message- From: Anish Kumar K. [mailto:[EMAIL PRO

Still getting errors

2006-07-11 Thread Ryan Dillinger
Hello again, I have rewrote this script I hoped the way you told me. And now I have just one error that states: Use of uninitialized value in hash element at names.pl line 24, <> line 1. Forgive me, but I'm not sure what's going on here. #!/usr/bin/perl use warnings; use strict; my %names

RE: Still getting errors

2006-07-11 Thread Charles K. Clarkson
Ryan Dillinger wrote: : Hello again, : I have rewrote this script I hoped the way you told me. : And now I have just one error that states: Use of uninitialized : value in hash element at names.pl line 24, <> line 1 When I run the script I get this. Are you sure this is the script you are ru

Re: Still getting errors

2006-07-11 Thread Mr. Shawn H. Corey
Ryan Dillinger wrote: > Hello again, > I have rewrote this script I hoped the way you told me. > And now I have just one error that states: Use of uninitialized value in > hash element at > names.pl line 24, <> line 1. You are not posting the script you are running. It is difficult to answer spec

Re: Specify download file name

2006-07-11 Thread Anish Kumar K.
Hi Prasanna Thanks for the reply. But that is not helping me in the situation Thanks Anish Nagasamudram, Prasanna Kumar wrote: Hi Anish Can you try adding the following to your $cgiObject->header ? -attachment=>'$filename.zip', And changing -type=>'application/zip' to -type=>'application

Re: write out filenames of files existing on a filesystem into afile

2006-07-11 Thread Randal L. Schwartz
> "Mumia" == "Mumia W " writes: Mumia> Not quite. Rob's program works for rational input data. And that attitude creates fragile, eventually broken code. Many years ago, people wrote shell scripts that couldn't deal with spaces in filenames, because they said something like you just said...

Re: write out filenames of files existing on a filesystem into afile

2006-07-11 Thread Randal L. Schwartz
> "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes: Rob> Not much chance of that I'm afraid Shawn. I can do without the apology, I just Rob> wish he'd confirm that his original critique was wrong instead of banging on Rob> about filenames with three dots. I think leaving people with that misin

Re: write out filenames of files existing on a filesystem into afile

2006-07-11 Thread Randal L. Schwartz
> "Shawn" == "Mr Shawn H Corey" <[EMAIL PROTECTED]> writes: Shawn> Not everyone who reads this mailing list posts to it. What impression Shawn> would his comments leave on them? How can we encourage people to use Shawn> Perl if they think they will receive harsh criticism? The fact that the Sh

Re: write out filenames of files existing on a filesystem into afile

2006-07-11 Thread Ask Bjoern Hansen
Rob Dixon wrote: Not much chance of that I'm afraid Shawn. I can do without the apology, I just wish he'd confirm that his original critique was wrong instead of banging on about filenames with three dots. I think leaving people with that misinformation uncorrected is a lot more important. Hi

Re: efficiently keeping a short list

2006-07-11 Thread Jay Savage
On 7/10/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: Jay Savage wrote: > foreach ('a'..'z') { > $recent{$_} = time; > sleep 1; > } Ouch. The OP did mention his limit was 200. So he must have more than 200 elements to scan. This algorithm will takes at least 3m20s, so it's hard

Re: efficiently keeping a short list

2006-07-11 Thread Jay Savage
On 7/10/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: Jay Savage wrote: > foreach ('a'..'z') { > $recent{$_} = time; > sleep 1; > } Ouch. The OP did mention his limit was 200. So he must have more than 200 elements to scan. This algorithm will takes at least 3m20s, so it's hard

Re: efficiently keeping a short list

2006-07-11 Thread Mr. Shawn H. Corey
Jay Savage wrote: > Not sure what kind of hardware you have, but it takes considerably > less than a second for me. Not counting the sleep(), of course, which > was just to guarantee unique timestamps for the example. Assuming the > data being used for the keys (the "elements") is of a reasonable s

Re: efficiently keeping a short list

2006-07-11 Thread Jay Savage
Yet another victim of the dreaded reply-to On 7/11/06, Jay Savage <[EMAIL PROTECTED]> wrote: On 7/11/06, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > Jay Savage wrote: > > No thank you, you have change the script from using seconds to fraction > of seconds. If you had done this the first tim

Re: efficiently keeping a short list

2006-07-11 Thread Dr.Ruud
Tom Allison schreef: > I want to keep a short list of the most recently used 'X'. > < 200 elements. > > Is there any suggestions other than to > unshift @recent, $element; > $#recent = $maximum; > > I know this will create a lot of array movement, but I can't think of > anything better off the top

Re: write out filenames of files existing on a filesystem into afile

2006-07-11 Thread Rob Dixon
Randal I'm in two minds as to whether to just let this go as it had gone on for too long, but I will try just once more to explain my true stance, which you seem keen to obfuscate. (Randal L. Schwartz) wrote: > >>"Rob" == Rob Dixon <[EMAIL PROTECTED]> writes: > > Rob> Not much chance of that

Re: Still getting errors

2006-07-11 Thread John W. Krahn
Ryan Dillinger wrote: > Hello again, I assume that you are replying to my post but it is hard to tell because you have started a new thread with a new Subject line. > I have rewrote this script I hoped the way you told me. I assume that "you" is me. The comments I made were (mostly) supposed

pattern match

2006-07-11 Thread Ryan Dillinger
Hello, I had two scripts that were identical, well almost. I ran the two together, but straghtened them out. Anyway I have one here, that when ran say's: Use of uninitialized value in pattern match (m//) at headline.pl line 7 and 10. I have changed differernt things within, nothing worked. It i

RE: pattern match

2006-07-11 Thread Timothy Johnson
At the moment I can't think of why this makes a difference (somebody help me here), but you aren't specifying a mode for the open() function. Also, you're not checking whether your match succeeded before using $1 (which is what I think you meant on that last line). I personally would write it a li

Re: pattern match

2006-07-11 Thread Mr. Shawn H. Corey
Ryan Dillinger wrote: > Hello, > I had two scripts that were identical, well almost. I ran the two > together, but > straghtened them out. Anyway I have one here, that when ran say's: Use > of uninitialized > value in pattern match (m//) at headline.pl line 7 and 10. I have > changed differernt thi

Re: pattern match

2006-07-11 Thread Mr. Shawn H. Corey
Ryan Dillinger wrote: > Hello, > I had two scripts that were identical, well almost. I ran the two > together, but > straghtened them out. Anyway I have one here, that when ran say's: Use > of uninitialized > value in pattern match (m//) at headline.pl line 7 and 10. I have > changed differernt thi

Re: pattern match

2006-07-11 Thread Mumia W.
Ryan Dillinger wrote: > [...] > #!/usr/bin/perl > use warnings; > use strict; > > open LYNX, "lynx -source http://www.perl.com/ |" or die "Can't open lynx: > $!"; > $_ = ""; > $_ = until /standard\.def/; > If 'standard.def' is not found, this line loops forever. > my $head = ; > $head =~ m|^]

calling a perl script on windows

2006-07-11 Thread Mahdi A Sbeih
Hi all, I am working on porting some scripts from unix to windows, and I noticed that perl ignores the first line of the script, and it seems I have to run the script like this: D:\Perl\bin\perl.exe myscript.pl if I run it like we do on unix: ./myscript.pl it will search the path and it uses