newbie question about print header

2006-03-08 Thread Mary Anderson
I want to know how to tell my application not to cache. Kevin Meltzer's book and Lincoln Stein's book neatly drop that ball between them. Can I use the cgi.pm header routine and hand it a variable? print header (-no-cache= 1) .. there are several variants of this --- using -nph-1 its

Re: newbie question about print header

2006-03-08 Thread Bill Stephenson
From the CGI.pm docs... Most browsers will not cache the output from CGI scripts. Every time the browser reloads the page, the script is invoked anew. You can change this behavior with the -expires parameter. When you specify an absolute or relative expiration interval with this parameter,

[OT] sanitize/sanitise ? [was: [regexp] Speaking of the /s modifier...]

2006-03-08 Thread Hans Meier (John Doe)
Adam W am Mittwoch, 8. März 2006 02.10: Hans Meier (John Doe) wrote: Adam W am Mittwoch, 8. März 2006 00.49: Sorry, I'm relatively new to programming in general (perl is my first programming language), so I'm not sure what you mean by sanitizing. Could also be sanitising, saw both :-)

problems with Class::Std and Vstrings

2006-03-08 Thread Angus
Hi, I am trying to write some perl objects using Class::Std but when I run tests against my module it says Error: Vstrings are not implemented in the version of perl at /../../../5.8.7/version/vpp.pm Is this is a know bug or should I just try to re-install Class::Std and it's

multistring replacement

2006-03-08 Thread Eugeny Altshuler
Hello! I have such problem, I need to make multistring replacement... How can I do this? I tried to make perl script which acquires file form STDIN and prints result into STDOUT cat file.html | ./myscript I work with html-files and I want to convert them into necessory format. I want to delete

Re: multistring replacement

2006-03-08 Thread Hans Meier (John Doe)
Eugeny Altshuler am Mittwoch, 8. März 2006 11.35: Hello! I have such problem, I need to make multistring replacement... How can I do this? I tried to make perl script which acquires file form STDIN and prints result into STDOUT cat file.html | ./myscript That's one way to pass the file

Re: multistring replacement

2006-03-08 Thread Eugeny Altshuler
That's one way to pass the file content to a script via the STDIN filehandle. A shorter way is to pass the filename to the script: $ ./myscript file.html Try out this code: #!/usr/bin/perl use strict; use warnings; open my $fh, $ARGV[0] or die can't open passed file '$ARGV[0]': $!;

Re: multistring replacement

2006-03-08 Thread Chas Owens
On 3/8/06, Eugeny Altshuler [EMAIL PROTECTED] wrote: snip local $/; # to slurp the file at once my $joined=; snip What '\s*=\s*([']).*?\1' mean? Be careful with the setting of $/. In small scripts like this one it is not very dangerous, but in larger scripts in can cause all manner of bugs

Re: multistring replacement

2006-03-08 Thread Bob Showalter
Chas Owens wrote: On 3/8/06, Eugeny Altshuler [EMAIL PROTECTED] wrote: snip local $/; # to slurp the file at once my $joined=; ... Be careful with the setting of $/. In small scripts like this one it is not very dangerous, but in larger scripts in can cause all manner of bugs if not properly

how to work with ^@ ^M ^D etc. ?

2006-03-08 Thread Eugeny Altshuler
How to replace character which looks in vim like ^@ ^M ^D ? I try to parse file generated by soft to my mobile for comfort reading. Thanks, Altshuler Eugeny -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: how to work with ^@ ^M ^D etc. ?

2006-03-08 Thread Tom Phoenix
On 3/8/06, Eugeny Altshuler [EMAIL PROTECTED] wrote: How to replace character which looks in vim like ^@ ^M ^D ? It looks as if you're talking about control characters. In Perl's double-quoted strings, and similar places, you may use \cX to denote control-X. So you could write code like this,

Re: how to work with ^@ ^M ^D etc. ?

2006-03-08 Thread Rafael Morales
It seems like if you were creating/editing files in windows and re-editing in unix later. When I have that symbols I do this in my console. dos2unix original_file.txt newfile.txt Use it maybe it helps you. - Original Message - From: Tom Phoenix [EMAIL PROTECTED] To: Eugeny

Re: problems with Class::Std and Vstrings

2006-03-08 Thread Tom Phoenix
On 3/8/06, Angus [EMAIL PROTECTED] wrote: Error: Vstrings are not implemented in the version of perl at /../../../5.8.7/version/vpp.pm Is this is a know bug or should I just try to re-install Class::Std and it's dependencies? It's a known feature. :-) As seen at

counting scalar array elements question

2006-03-08 Thread Graeme McLaren
Hi all, I have an array question: If I have a variable, $var, and it contains an array how would I be able to easily count the number of elements in the array? I've tried creating a new array and pushing the original array on to it but that creates an array of arrays. Basically I have: my

RE: counting scalar array elements question

2006-03-08 Thread Timothy Johnson
You need to dereference your array ref. my $count = @{$var}; Or in some circumstances it might make more sense to explicitly use scalar context: my $count = scalar @{$var}; -Original Message- From: Graeme McLaren [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 08, 2006 3:57 PM

Re: counting scalar array elements question

2006-03-08 Thread Hans Meier (John Doe)
From: Graeme McLaren [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 08, 2006 3:57 PM To: beginners@perl.org Subject: counting scalar array elements question Hi all, I have an array question: If I have a variable, $var, and it contains an array how would I be able to easily

Re: counting scalar array elements question

2006-03-08 Thread John W. Krahn
Hans Meier (John Doe) wrote: From: Graeme McLaren [mailto:[EMAIL PROTECTED] If I have a variable, $var, and it contains an array how would I be able to easily count the number of elements in the array? I've tried creating a new array and pushing the original array on to it but that creates

linux doesn't like me

2006-03-08 Thread Kathryn E. Bushley
Hello, Maybe not a perl question but I'm trying to run my perl program below and am getting the following error which I'm fairly certain is from the linux system: (BC1G_02948.1) AMP 1/1 144 522 sh: -c: line 0: syntax error near unexpected token `(' sh: -c: line 0: `getseq.pl 56 374

Re: linux doesn't like me

2006-03-08 Thread Jeff Pang
(BC1G_02948.1) AMP 1/1 144 522 sh: -c: line 0: syntax error near unexpected token `(' sh: -c: line 0: `getseq.pl 56 374 (BC1G_03519.1) Botrytis_annotations' How do you run your script? It seems that you run it as 'sh script.pl'. For correctly,you should run it as 'perl script.pl' or 'chmod +x

RE: FW: Reading a Unicode text file

2006-03-08 Thread Baskaran Sankaran
Hi group, Finally I made Perl to understand my file (the context is the mail quoted below). The problems is with how the file is saved in Unicode. I saved the file this time as utf8 (in notepad) and the same code works now (earlier I saved as Unicode text file) including regular expression

Re: linux doesn't like me

2006-03-08 Thread Tom Phoenix
On 3/8/06, Kathryn E. Bushley [EMAIL PROTECTED] wrote: Maybe not a perl question but I'm trying to run my perl program below and am getting the following error which I'm fairly certain is from the linux system: (BC1G_02948.1) AMP 1/1 144 522 sh: -c: line 0: syntax error near unexpected

Re: linux doesn't like me

2006-03-08 Thread John W. Krahn
Kathryn E. Bushley wrote: Hello, Hello, Maybe not a perl question but I'm trying to run my perl program below and am getting the following error which I'm fairly certain is from the linux system: (BC1G_02948.1) AMP 1/1 144 522 sh: -c: line 0: syntax error near unexpected token `(' sh:

LinuxMurah.com wants to talk to you using Google Talk

2006-03-08 Thread LinuxMurah . com
--- LinuxMurah.com wants to talk to you for free using Google Talk. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-d09da123d2-c968a3e5b6-71df5c976a5f43bc You'll need to click this link in order to

Parallel Port and Console Application

2006-03-08 Thread LinuxMurah . com
Hi GUYS, I'm a beginner in PERL. After Python confusing me about installing Parallel Port module, I decide to try Perl and hopefuly I have a future with Perl. So I already download Parallel Port module (http://search.cpan.org/CPAN/authors/id/S/SC/SCOTT/Device-ParallelPort-1.00.tar.gz) then how

cpan message

2006-03-08 Thread Owen
This message pops up when a new CPAN.pm is available There's a new CPAN.pm version (v1.87) available! [Current version is v1.83] You might want to try install Bundle::CPAN reload cpan without quitting the current session. It should be a seamless upgrade while we are running...