Bill Stephenson wrote:
Take a look at the example scripts and docs...
http://search.cpan.org/src/LDS/CGI.pm-3.29/examples/index.html
http://search.cpan.org/src/LDS/CGI.pm-3.29/cgi_docs.html
I'm pretty sure you'll find the syntax you need in those documents.
Kindest Regards,
--
Bill
On 04/30/2007 11:03 PM, [EMAIL PROTECTED] wrote:
I actually have the book as well ('Official Guide to Programming with
CGI.pm') and have practically torn it apart trying to find a way to do
what I want. I've tracked down and read a number of articles and forum
postings as well.
I have a
Below is code I presently use to download to clients and the generated
html. One client objects to the generated html - the
Content-Disposition ... Does any one have another method to download
AND display the pdf with perl.
sub Display_PDF {
my ($pdf, $pdf_size) = @_;
$|=0;
print
On Tuesday May 1 2007 6:56 am, Moon, John wrote:
Below is code I presently use to download to clients and the generated
html. One client objects to the generated html - the
Content-Disposition ... Does any one have another method to download
AND display the pdf with perl.
sub Display_PDF {
On Tuesday May 1 2007 6:56 am, Moon, John wrote:
Below is code I presently use to download to clients and the generated
html. One client objects to the generated html - the
Content-Disposition ... Does any one have another method to download
AND display the pdf with perl.
sub Display_PDF {
The original intent was to generate a save-as dialog box instead of
displaying the PDF inline? I believe the problem with this is that it
can cause blank browser windows to open, which some people don't like.
This is a browser issue and I'm not aware of an alternative. Removing
the
Mumia W. wrote:
On 04/30/2007 11:03 PM, [EMAIL PROTECTED] wrote:
I actually have the book as well ('Official Guide to Programming with
CGI.pm') and have practically torn it apart trying to find a way to do
what I want. I've tracked down and read a number of articles and forum
postings as
This one has me stumped, and it shouldn't.
I'm trying to validate data from a simple select box:
select size=1 name=country
option selected value='United States'United States/option
option value='Canada'Canada/option
/select
When I do:
foreach my $Item (param())
{
my
Hi all,
Is there a perl built in function that search a value in sorted array?
Although I found such an algorithm in the cpan (Search::Binary), I wonder if
there is an efficient solution within the core perl.
Thanks in advanced,
Yaron Kahanovitch
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
2007/5/1, [EMAIL PROTECTED] [EMAIL PROTECTED]:
Hi all,
Is there a perl built in function that search a value in sorted array?
Although I found such an algorithm in the cpan (Search::Binary), I wonder if
there is an efficient solution within the core perl.
For large array which was sorted
I am using postgres8.2 in netbsd OS
1.How to install perl here?
2.Can we use perl programs for manipulating data in postgres database
Thanks
2007/5/1, Maphin Philip [EMAIL PROTECTED]:
1.How to install perl here?
2.Can we use perl programs for manipulating data in postgres database
Hello,
1. Google it with keyword how to install perl on netbsd.
2. Surely you can.Please check the modules on CPAN like DBI.
--
Chinese Practical
#!/usr/bin/perl
use strict;
use warnings;
my @a = qw(abc def ghi);
for my $s (@a) {
$s =~ /(b)|(e)|(h)/;
print 1 = [$1] 2 = [$2] 3 = [$3]\n;
}
Thank you for the kind replies. I understand now and
have modified the code to:
use strict;
use warnings;
my $jfsFile =
On 5/1/07, oryann9 [EMAIL PROTECTED] wrote:
snip
my $regexp = qr/(host:\w+)/is;
my $regexp1 = qr/(onlinejfs.*)/is;
my $regexp2 = qr/(jfs\sversion.*)/is;
snip
Why are you creating these regexes so far from where they are used?
If you are going to do this at least give them meaningful names.
Hi, I'm a NetBSD user.
Maphin Philip [EMAIL PROTECTED] wrote:
I am using postgres8.2 in netbsd OS
1.How to install perl here?
Maybe it be a OT but it ca do here:
You can ask in private mail ok and can mail all info need for run perl
wit postgresql.
2.Can we use perl
On 5/1/07, Maphin Philip [EMAIL PROTECTED] wrote:
I am using postgres8.2 in netbsd OS
1.How to install perl here?
Look at your netbsd ports collection documentation on how to install
software on your system using the facility.
2.Can we use perl programs for manipulating data in
Why are you creating these regexes so far from
where
they are used?
If you are going to do this at least give them
meaningful names.
I dont have a good reason Chas other than I like the
ability to easily change the variable in one spot in
case of future use.
If this is not a good
Hi, i have a matching problem. I get input from the user as a 3-5
character long string consisting of characters from 'l' to 't', and
the chars are always sorted for example, the user enters: 'lrqo'. It
becomes: 'loqr'. But i have to match the modified string to any of the
following: lmn, lpt,
2007/5/2, Somu [EMAIL PROTECTED]:
Hi, i have a matching problem. I get input from the user as a 3-5
character long string consisting of characters from 'l' to 't', and
the chars are always sorted for example, the user enters: 'lrqo'. It
becomes: 'loqr'. But i have to match the modified string
On 5/1/07, Somu [EMAIL PROTECTED] wrote:
Hi, i have a matching problem. I get input from the user as a 3-5
character long string consisting of characters from 'l' to 't', and
the chars are always sorted for example, the user enters: 'lrqo'. It
becomes: 'loqr'. But i have to match the modified
my $s = ;
my $t = ;
conc ( $s , $t );
sub conc {
my $str = $_[0].$_[1];
print $str;
}
Why? It works allright only after add an extra line at the top, that is
sub conc;
its become just like C
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 5/1/07, Somu [EMAIL PROTECTED] wrote:
my $s = ;
my $t = ;
conc ( $s , $t );
sub conc {
my $str = $_[0].$_[1];
print $str;
}
Why?
Why not?
It works allright only after add an extra line at the top, that is
sub conc;
its become just like C
Are you asking a question? Perhaps
#!/usr/bin/perl
use strict;
my @Strings = qw(lmn lpt lor mps npr nqt opq rst);
chomp(my $Input = STDIN);
my $SortedChars = join , sort (split //, $Input);
foreach (@Strings)
{
if ($SortedChars =~ /$_/)
{
print Got a match for $Input with $_\n;
On 5/1/07, Chas Owens [EMAIL PROTECTED] wrote:
On 5/1/07, Somu [EMAIL PROTECTED] wrote:
my $s = ;
my $t = ;
conc ( $s , $t );
sub conc {
my $str = $_[0].$_[1];
print $str;
}
Why? It works allright only after add an extra line at the top, that is
sub conc;
its become just
On 5/1/07, Somu [EMAIL PROTECTED] wrote:
my $s = ;
my $t = ;
conc ( $s , $t );
sub conc {
my $str = $_[0].$_[1];
print $str;
}
Why? It works allright only after add an extra line at the top, that is
sub conc;
its become just like C
Your code works just fine for me (no errors).
Actually, that was just an example to explain my problem. I am facing
this problem when i use Tk. Any subroutine associated with the
-command option of a button widget.
use Tk;
my $mw = MainWindow-new;
my $b = $mw-Button(-text='hello',-command=sub { welcome })-pack;
my $l =
Because if define it, it says 'Global variable $l needs...' what do
i do? Actually, i am not happy nor sad that the subroutine needed a
declaration before use.. I'm using ActivePerl 5.8.8 on Windows XP
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Thats where the problem arises
my $input = 'loqr';
if ( $input =~ m!lor!i ) {print 'match'}
how will that match? i want them to match. Thats what i want to do.
by the way, can i get some url where i can get lots of problems and
solutions on regexp. I'm very weak in it..
--
To unsubscribe,
Hi, I'm using NetBSD in both, test and production enviroment.
there are many resources for setup perl, and PgPP, DBI, DBD::Pg and Pg
module.
This is a OT, but if you sendme a private mail, maybe can help you.
the http://wiki.netbsd.se have many tutorials for setting a
Somu wrote:
Actually, that was just an example to explain my problem. I am facing
this problem when i use Tk. Any subroutine associated with the
-command option of a button widget.
use Tk;
my $mw = MainWindow-new;
my $b = $mw-Button(-text='hello',-command=sub { welcome })-pack;
my $l =
On 5/1/07, Somu [EMAIL PROTECTED] wrote:
my $input = 'loqr';
if ( $input =~ m!lor!i ) {print 'match'}
how will that match? i want them to match. Thats what i want to do.
You can add the 'q' to the pattern. Is this what you want?
if ( $input =~ /loqr/i ) { print 'match' }
Or you can
Hi All,
My script is executing external program, which returns code i.e 0, -1, -2, -3
etc
In case of error, I need to create log file according to error code.
For example code -3 means missing input file
use strict;
use warnings;
use Win32;
system ( $program -f $program.cfg );
if ($? ==
On 5/1/07, Somu [EMAIL PROTECTED] wrote:
Actually, that was just an example to explain my problem. I am facing
this problem when i use Tk. Any subroutine associated with the
-command option of a button widget.
use Tk;
my $mw = MainWindow-new;
my $b = $mw-Button(-text='hello',-command=sub {
On 5/1/07, Vladimir Lemberg [EMAIL PROTECTED] wrote:
snip
This is not working. Nothing is printing to the log file when I'm simulating -3
code.
If I print $?, it shown 65280.
snip
from perldoc -f system:
if ($? == -1) {
print failed to execute: $!\n;
}
elsif ($? 127) {
On 5/1/07, Vladimir Lemberg [EMAIL PROTECTED] wrote:
My script is executing external program, which returns code i.e 0, -1, -2, -3
etc
if ($? == -3) {
This is not working. Nothing is printing to the log file when I'm simulating
-3 code. If I print $?, it shown 65280.
The value in $? is
Hi Tom,
That was very helpful.
Thanks a lot,
Vladimir
- Original Message -
From: Tom Phoenix [EMAIL PROTECTED]
To: Vladimir Lemberg [EMAIL PROTECTED]
Cc: beginners@perl.org
Sent: Tuesday, May 01, 2007 5:36 PM
Subject: Re: Capturing an external program return code
On 5/1/07,
On 05/01/2007 07:09 PM, Vladimir Lemberg wrote:
[...]
system ( $program -f $program.cfg );
if ($? == -3) {
[...]
You're facing two problems: the return value for system() needs to be
shifted right by eight bits; and that value is provided in unsigned
form, so you have to massage it:
my
37 matches
Mail list logo