NAME
beginners-faq - FAQ for the beginners-cgi 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
Hi guys.
What's the 'usual' way (if there is one) of implementing an 'active' back
button (which does the equivalent of the browser's back button but is
implemented in CGI code)?
If, say, I'm doing a database search and come up with a list of records,
each of which can be clicked on to provide
4. Decoded file is streamed to user, who saves the file locally.
Jason
Below I've provided a starting point to answer your 4th question anyway.
It doesn't have a proper strict style or complete error reporting, but
it does work (last I checked) and should get you started.
--
Hello,
I'm not on the list, so please CC me directly.
Although I'm a reasonably competent Perl user I have never actually
used it for CGI purposes, just for database querying/data munging.
You can imagine my perpetual confusion at finding the Perl books in
the Web programming section of the
Rob Dixon wrote:
Hi guys.
What's the 'usual' way (if there is one) of implementing an 'active' back
button (which does the equivalent of the browser's back button but is
implemented in CGI code)?
If, say, I'm doing a database search and come up with a list of records,
each of which can be clicked
Hi guys.
What's the 'usual' way (if there is one) of implementing an
'active' back
button (which does the equivalent of the browser's back button but is
implemented in CGI code)?
It is usually done with javascript and pretty easy to do. Although you may
already be aware of this and
John Goodleaf wrote:
Hello,
I'm not on the list, so please CC me directly.
Although I'm a reasonably competent Perl user I have never actually
used it for CGI purposes, just for database querying/data munging.
You can imagine my perpetual confusion at finding the Perl books in
the Web programming
4. Decoded file is streamed to user, who saves the file locally.
Jason
Below I've provided a starting point to answer your 4th question anyway.
It doesn't have a proper strict style or complete error reporting, but
it does work (last I checked) and should get you started.
--
-Original Message-
From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]
Sent: Friday, March 26, 2004 6:11 PM
To: Allen Wang
Cc: [EMAIL PROTECTED]
Subject: Re: GD Install Failure (was: Re: elsif issues still)
Please bottom post...
Allen Wang wrote:
The first error message should be
Hi all:
Here is my problem. I have a script which processes input from a
textarea which may have 'special characters' in it like or etc.
Unfortunately what I am getting back are these or respectively.
Script snippet start--
use CGI qw/:standard/;
print Content-type:
Good Afternoon All
I'm overhauling the website I run for a men's rec
slopitch league. It's all CGI.pm and mySQL. I'm adding
a section to reschedule rain-out games. I want the users
to pick the new date from a 'calendar'.
I think this will be a more natural interface than drop-down
On Mon, 29 Mar 2004 16:18:29 -0500
B McKee [EMAIL PROTECTED] wrote:
Good Afternoon All
I'm overhauling the website I run for a men's rec
slopitch league. It's all CGI.pm and mySQL. I'm adding
a section to reschedule rain-out games. I want the users
to pick the new date from a
B McKee [EMAIL PROTECTED] wrote:
:
: I'm overhauling the website I run for a men's rec
: slopitch league. It's all CGI.pm and mySQL. I'm
: adding a section to reschedule rain-out games. I want
: the users to pick the new date from a 'calendar'.
: I think this will be a more natural
Allen Wang wrote:
-Original Message-
From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]
Sent: Friday, March 26, 2004 6:11 PM
To: Allen Wang
Cc: [EMAIL PROTECTED]
Subject: Re: GD Install Failure (was: Re: elsif issues still)
Please bottom post...
Allen Wang wrote:
The first error
Andrew Gaffney wrote:
John Goodleaf wrote:
Hello,
I'm not on the list, so please CC me directly.
Although I'm a reasonably competent Perl user I have never actually
used it for CGI purposes, just for database querying/data munging.
You can imagine my perpetual confusion at finding the Perl books
Rob Dixon wrote:
Hi guys.
What's the 'usual' way (if there is one) of implementing an 'active' back
button (which does the equivalent of the browser's back button but is
implemented in CGI code)?
If, say, I'm doing a database search and come up with a list of records,
each of which can be clicked
Please bottom post...
B. Fongo wrote:
The error occurs on initial call, so id should be empty be then. I
expect the routine to open a new session (see code below) if session_id
is empty - but it fails then.
==
my $dbh = dbConnect();
# Get
Hi all,
Does anyone know how could I print a UTF-8 HTML page (like Google's one)?
Which modules I need to use?
Is perl able to do that?
Thank you.
Teddy
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I want to send HTML file via
MIME::Lite
Is that practicable?
Hai all.
I want to make a script which converts like (pErl1234test = perl).I
wrote like
#!/usr/bin/perl
print Enter ur name
$name = STDIN
$org_name = $name
$name =~ s/\W.*//; #change 1
$name =~ tr/A-Z/a-z/; #change 2
On Mon, 29 Mar 2004 15:05:34 +0530
MuthuKumar [EMAIL PROTECTED] wrote:
Hai all.
I want to make a script which converts like (pErl1234test =
perl).I
wrote like
#!/usr/bin/perl
print Enter ur name
$name = STDIN
$org_name = $name
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):
I'm sorry, the previous subject should have been changed. My apologies.
while (FILE) {
$counter++;
}
I know this is probably simple, but how would I increment by 20? In other
words, $counter would increment 1 time for every twenty lines of the file? Any
help would be appreciated.
while (FILE) {
$counter++;
}
I know this is probably simple, but how would I increment by 20? In other
words, $counter would increment 1 time for every twenty lines of the file? Any
help would be appreciated.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 29, 2004 6:20 AM
Subject: Incrementing count
I'm sorry, the previous subject should have been changed. My apologies.
while (FILE) {
$counter++;
}
I know this is probably simple, but how
On Mar 29, 2004, at 3:35 AM, MuthuKumar wrote:
Hai all.
Howdy.
I want to make a script which converts like (pErl1234test =
perl).I
wrote like
#!/usr/bin/perl
print Enter ur name
$name = STDIN
$org_name = $name
You are missing semi-colons on all three
You just attach the html page?
If you want to actually send an html email that is different and you should
perldoc MIME::Lite.
Html mail is blocked on a lot of peoples systems. I for one will not even open
a message that is not plain text. Just a suggestion.
Paul
On Monday 29 March 2004 02:59
On Mar 29, 2004, at 8:20 AM, [EMAIL PROTECTED] wrote:
I'm sorry, the previous subject should have been changed. My apologies.
while (FILE) {
$counter++;
}
I know this is probably simple, but how would I increment by 20? In
other
words, $counter would increment 1 time for every twenty lines
MuthuKumar wrote:
Hai all.
I want to make a script which converts like (pErl1234test = perl).I
wrote like
#!/usr/bin/perl
print Enter ur name
$name = STDIN
$org_name = $name
$name =~ s/\W.*//; #change 1
$name =~ tr/A-Z/a-z/;
I want to shut the standard error from my scritps.
How to do that?
Bob Showalter wrote:
JupiterHost.Net wrote:
Hello List!
I was trying to figure out how to see the user the script/webserver is
running as. (Like Apache is 'nobody' or the owner 'foomonkey' perhaps
with SuExec enabled)
I looked in %ENV and didn't see it in there.
Are you trying to find out
WC -Sx- Jones wrote:
JupiterHost.Net wrote:
problem is foo.pl can be run simultaneously by 2 different users so
I'm not sure how I'd be able to make foo.pl tell which ps it belongs to.
Not a problem - each will have it's own address space and PID.
The issue - and you haven't shown any code
On Mon, 29 Mar 2004 00:38:50 -0700
Bryan Harris [EMAIL PROTECTED] wrote:
Alternatively, you can use the '-t' operator:
exit 0 if -t STDIN
I've been waiting for this for a LONG time, thanks Smoot.
No problem. It took me a while to find the correct operator as well.
Please keep in
Wc -Sx- Jones wrote:
Bryan Harris wrote:
I did this because I want to make sure I end with a \n, but I don't want
an extra one if one is already there. I guess I could've also done a:
$newtxt =~ s/([^\n])$/$1\n/;
This is clearer:
$newtext = Hello\n\n\n;
$newtext =~ s/\n+/\n/;
MuthuKumar wrote:
Hai all.
I want to make a script which converts like (pErl1234test = perl).I
wrote like
#!/usr/bin/perl
print Enter ur name
$name = STDIN
$org_name = $name
$name =~ s/\W.*//; #change 1
$name =~ tr/A-Z/a-z/;
yes.
Create a multipart message (i.e., one with attachments):
### Create a new multipart message:
$msg = MIME::Lite-new(
From='[EMAIL PROTECTED]',
To ='[EMAIL PROTECTED]',
Cc ='[EMAIL
Harry Putnam wrote:
I'm getting this output on stderr from a next clause:
Exiting subroutine via next at ./test_bol.pl line 101.
I wondered why this happens. Is it considered an error or what?
The script is lengthy so not posting it here but the next does exit a
sub routine. That is why I put
MuthuKumar wrote:
Hai all.
I want to make a script which converts like (pErl1234test = perl).I
wrote like
#!/usr/bin/perl
print Enter ur name
$name = STDIN
$org_name = $name
$name =~ s/\W.*//; #change 1
$name =~ tr/A-Z/a-z/;
Andrew Gaffney [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
R. Joseph Newton wrote:
Andrew Gaffney wrote:
[snip]
I didn't do it this way because there is a first pay period. If there
are only 2 pay
periods from the starting date, you can't build a list of 6. My way takes
that
I wasn't able to really understand perldoc -f warn.
I'm doing
use File::Find;
open(FILE,$File::Find::name)or warn blah blah: $!;
Two things I'm unsure of:
1) is the `: $!' meaningfull here?
2) do I need a `next;' following to make `File::Find' go on to the next
found file?
If so, how do I let
Chance Ervin wrote:
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 29, 2004 6:20 AM
Subject: Incrementing count
I'm sorry, the previous subject should have been changed. My apologies.
while (FILE) {
$counter++;
}
I know this is probably simple,
Or this can be further simplified:
while (FILE) {
$counter += 20;
}
The += operator is equivilent to saying add the value then assign it to
the variable.
Tim Donahue
-Original Message-
From: Chance Ervin [mailto:[EMAIL PROTECTED]
Sent: Monday, March 29, 2004 1:03 PM
To: [EMAIL
[EMAIL PROTECTED] wrote:
I'm sorry, the previous subject should have been changed. My
apologies.
while (FILE) {
$counter++;
}
I know this is probably simple, but how would I increment by 20? In
other words, $counter would increment 1 time for every twenty lines
of the file? Any
JupiterHost.Net wrote:
Hello List!
I was trying to figure out how to see the user the script/webserver is
running as. (Like Apache is 'nobody' or the owner 'foomonkey' perhaps
with SuExec enabled)
I looked in %ENV and didn't see it in there.
Are you trying to find out from a CGI script
Muthukumar wrote:
Hai all.
Hello,
I want to make a script which converts like (pErl1234test = perl).I
wrote like
#!/usr/bin/perl
print Enter ur name
$name = STDIN
$org_name = $name
$name =~ s/\W.*//; #change 1
The \W character class includes every character that is NOT a-z and
I'm using a next LABEL inside a File::Find
sub wanted {...} loop
It is further buried in a while loop inside the `sub wanted()'
The while loop is while (FILE) on the most recent found file. I
want this `next LABEL' to bring on a new file... not a new line in
while loop.
So using the `next
On Mon, 29 Mar 2004 12:14:49 -0600
James Edward Gray II [EMAIL PROTECTED] wrote:
On Mar 29, 2004, at 11:02 AM, Smoot Carl-Mitchell wrote:
On Mon, 29 Mar 2004 15:05:34 +0530
MuthuKumar [EMAIL PROTECTED] wrote:
$name =~ s/\W.*//; #change 1
This RE deletes zero or more
Hi,
At reaching a certain point in my perl program, I need to run a process
( say XYZ ) using SYSTEM command. The result file that this process
would produce will be result.process_id. I will have to wait until
this result file is produced then proceed extracting certain things
from this file.
On Mon, 29 Mar 2004 12:08:33 -0600
James Edward Gray II [EMAIL PROTECTED] wrote:
On Mar 29, 2004, at 8:20 AM, [EMAIL PROTECTED] wrote:
I'm sorry, the previous subject should have been changed. My
apologies.
while (FILE) {
$counter++;
}
I know this is probably simple, but
news [EMAIL PROTECTED] wrote:
:
: I want to make a script which converts like
: (pErl1234test = perl).I
: wrote like
:
: #!/usr/bin/perl
Always use the following two statements at the
beginning of your scripts. They will help catch errors.
use strict;
use warnings;
:
I'm running my own version of bulletinboard and I have a little problem
with hyperlinks. I'd like to make them really work. So if posted message
includes http://blaablaablaa it would be a hyeprlink when reader opens
the message. Messages are stored in .html files so it's quite easy to
add a
James Edward Gray II wrote:
Fact: This has nothing to do with ANY variables, it is the way warn()
is designed.
Trivia:
Did you know that $! does NOT contain an error string. It contains the
error *number*. The only reason you see a error sting is that it has an
overloaded stringification
Hi all,
I posted this last night but it appears to have gone lost...
Is there an easy way to create a Makefile that will run tests and then
install a Perl script not into the Perl module space but simply into /usr
local/bin (and possibly then a man page as well)? Everything I look at
On Mon, Mar 29, 2004 at 04:08:08PM +0300, John wrote:
I want to shut the standard error from my scritps.
How to do that?
close STDERR;
But that's living on the edge. You might consider redirecting STDERR
instead, or maybe reopening it to a file somewhere.
--
Paul Johnson - [EMAIL
From: Howard Fuchs [EMAIL PROTECTED]
Here is my problem. I have a script which processes input from a
textarea which may have 'special characters' in it like ? or ? etc.
Unfortunately what I am getting back are these ? or
respectively.
Looks like UTF8 (Unicode).
I believe you will have to
T.S. Ravi Shankar wrote:
Hi,
At reaching a certain point in my perl program, I need to run a
process ( say XYZ ) using SYSTEM command. The result file that this
process would produce will be result.process_id. I will have to
wait until this result file is produced then proceed extracting
Harry Putnam [EMAIL PROTECTED] wrote:
:
: I'm using a next LABEL inside a File::Find
: sub wanted {...} loop
:
: It is further buried in a while loop inside the
: `sub wanted()'
:
: The while loop is while (FILE) on the most recent
: found file. I want this `next LABEL' to bring on a
: new
Hi all.
Can anyone tell me how to place an email in an outbox for Lotus Notes to deliver?
I would like to include an attachment if possible.
I have googled and not had any luck.
Are there any modules for this?
Any scripts?
Thankx
n
Ned Cunningham
POS Systems Development
Monro Muffler Brake
Charles K. Clarkson [EMAIL PROTECTED] writes:
Harry Putnam [EMAIL PROTECTED] wrote:
[...]
Wants to exit a while loop inside a File::Find \wanted sub routine.
Is exiting the while loop sufficient.. or does one need to exit from
the current file being offered by `sub find()'
: So using the
I finally got back to a Jaguar system to verify that this used to work.
Symbolic links copied by psync on Panther seem to be copied incorrectly.
Psync is never satisfied and wants to copy them on each sync.
In Jaguar it worked as expected.
Can anyone shed light on this or at least try it on their
On Mar 29, MuthuKumar said:
I want to make a script which converts like (pErl1234test = perl).I
#!/usr/bin/perl
print Enter ur name
$name = STDIN
$org_name = $name
Those three lines are all missing semicolons.
$name =~ s/\W.*//; #change 1
On Mar 29, 2004, at 11:02 AM, Smoot Carl-Mitchell wrote:
On Mon, 29 Mar 2004 15:05:34 +0530
MuthuKumar [EMAIL PROTECTED] wrote:
$name =~ s/\W.*//; #change 1
This RE deletes zero or more non-alphanumeric characters followed by
anything.
So it deletes the entire string, since there was
John,
Thanks for the script. I need to filter the result by a specific file
extension, how do I that? I tried,
( not exists $files{ $dir } or $files{ $dir }{ mtime } -M _ )
and ( @{ $files{ $dir } }{ qw/name mtime/ } = ( $name, -M _ ) )
and ( /^(full)\w*(\.db)$/ )
It does not
Chris Charley wrote:
Andrew Gaffney [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
R. Joseph Newton wrote:
Andrew Gaffney wrote:
[snip]
I didn't do it this way because there is a first pay period. If there
are only 2 pay
periods from the starting date, you can't build a list of 6.
Bryan Harris wrote:
Wow, Johns, thanks for the tips... I'm going to have to study that map
command very closely. Either way you've answered my question, thanks!
Only one thing to add-- you ask:
chomp $newtxt;
print $newtxt, \n;
Why remove \n in one line and then add it
Hi all,
Is there an easy way to create a Makefile that will run tests and then
install a Perl script not into the Perl module space but simply into /usr
local/bin (and possibly then a man page as well)? Everything I look at
(including Makefile.PL) seems to be geared to module installation.
All,
I would like the ability to tie a database and use it as a multi-level data
structure, like
$tied{hash}{subhash}
$tied{hash}{array}[0]
Etc...
Any recommendations for this? I've heard I should check out the MLDBM module.
How have others conquered this issue? Is it possible?
Thanks,
Phil Schaechter wrote:
All,
I would like the ability to tie a database and use it as a
multi-level data structure, like
$tied{hash}{subhash}
$tied{hash}{array}[0]
Etc...
Any recommendations for this? I've heard I should check out the
MLDBM module. How have others conquered this
On Mon, 29 Mar 2004 18:38:48 +0530
T.S. Ravi Shankar [EMAIL PROTECTED] wrote:
At reaching a certain point in my perl program, I need to run a
process( say XYZ ) using SYSTEM command. The result file that this
process would produce will be result.process_id. I will have to
wait until this
Harry Putnam [EMAIL PROTECTED] wrote:
:
: Charles K. Clarkson [EMAIL PROTECTED] writes:
: Harry Putnam [EMAIL PROTECTED] wrote:
:
: [...]
:
: Wants to exit a while loop inside a File::Find \wanted
: sub routine. Is exiting the while loop sufficient.. or
: does one need to exit from the
WC -Sx- Jones [EMAIL PROTECTED] wrote:
:
: MuthuKumar wrote:
:
: I want to make a script which converts
: like (pErl1234test = perl). I wrote like
:
: #! /usr/bin/perl -w
:
: print Enter ur name;
: my $name = STDIN;
: my $org_name = $name;
: $org_name =~ s/[^a-z]/ /gi;
: $org_name
Harry Putnam wrote:
I wasn't able to really understand perldoc -f warn.
I'm doing
use File::Find;
open(FILE,$File::Find::name)or warn blah blah: $!;
Two things I'm unsure of:
1) is the `: $!' meaningfull here?
Yes.
2) do I need a `next;' following to make `File::Find' go on to
Charles K. Clarkson wrote:
WC -Sx- Jones [EMAIL PROTECTED] wrote:
:
: MuthuKumar wrote:
: print Enter ur name;
Sorry, Sx. That produces this:
Org = perltest
As Entered = pErl1234test
The OP wanted:
Org = perl
As Entered = pErl1234test
Sure, but Enter ur name could
any ideas on how I can access say all the values of a hash and not care what the keys
are?
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
On Mar 29, 2004, at 4:03 PM, [EMAIL PROTECTED] wrote:
any ideas on how I can access say all the values of a hash and not
care what the keys are?
Sure:
foreach (keys %some_hash) {
# do something with $_, which will hold one key at a time...
}
James
--
To unsubscribe, e-mail: [EMAIL
-Original Message-
From: James Edward Gray II [mailto:[EMAIL PROTECTED]
Sent: Monday, March 29, 2004 3:06 PM
To: ewalker
Cc: [EMAIL PROTECTED]
Subject: Re: hash
On Mar 29, 2004, at 4:03 PM, [EMAIL PROTECTED] wrote:
any ideas on how I can access say all the values of a hash and not
-Original Message-
From: James Edward Gray II [mailto:[EMAIL PROTECTED]
Sent: Monday, March 29, 2004 3:06 PM
To: ewalker
Cc: [EMAIL PROTECTED]
Subject: Re: hash
On Mar 29, 2004, at 4:03 PM, [EMAIL PROTECTED] wrote:
any ideas on how I can access say all the values of a hash and not
[EMAIL PROTECTED] wrote:
any ideas on how I can access say all the values of a hash and not
care what the keys are?
@arr = values %hash;
perldoc -f values
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Mar 29, 2004, at 4:09 PM, [EMAIL PROTECTED] wrote:
James
Hey, That didn't work I didn't explain it right.
I have an array of hash pointers. Each hash has like 2 key/value pairs.
I want to travers the array and just print out the values from the
hashes., Will I need to nest loops here?
-Original Message-
From: James Edward Gray II [mailto:[EMAIL PROTECTED]
Sent: Monday, March 29, 2004 3:18 PM
To: ewalker
Cc: [EMAIL PROTECTED]
Subject: Re: hash
On Mar 29, 2004, at 4:09 PM, [EMAIL PROTECTED] wrote:
James
Hey, That didn't work I didn't explain it right.
I have an
Hello Everyone,
We have a process where several scripts write to centralized log file. I
have to retrieve a specific set of information and display in a format.
Following is a snippet of log file
=
Bunch of text lines
Variable_name Value
1.
2.
3.
4.
.
.
.
Upto 200 lines
Rajesh Dorairajan wrote:
From: John W. Krahn [mailto:[EMAIL PROTECTED]
This should do what you want:
use strict;
use warnings;
use File::Find;
use vars qw( $dir $name );
*dir = *File::Find::dir;
*name = *File::Find::name;
my $localdir = 'C:/docs';
my %files;
find(
Where are you getting lost? I don't recall your previous
messages, so I'm not sure what like before means...
Anyway, here's an untested rewrite. Untested. Mmhm.
The biggest problem is making sure to reset %datastore
when you come across another bunch of text lines that
don't match your variable
Sanjeev Sagar wrote:
Hello Everyone,
Hello,
We have a process where several scripts write to centralized log file. I
have to retrieve a specific set of information and display in a format.
Following is a snippet of log file
=
Bunch of text lines
Variable_name
Big Thanks !
My log file looks like below
2004-03-26 @ 00:00:01 [EMAIL PROTECTED] -- 10881 10864 hyb01
:INFORMATIONAL
2004-03-26 @ 00:00:01 [EMAIL PROTECTED] -- 10881 10864 hyb01 Function
(up) returned (0) return code. -- seconds -- 1:INFORMATIONAL
2004-03-26 @ 00:00:01 [EMAIL PROTECTED] --
[EMAIL PROTECTED] wrote:
-Original Message-
From: James Edward Gray II [mailto:[EMAIL PROTECTED]
Sent: Monday, March 29, 2004 3:06 PM
To: ewalker
Cc: [EMAIL PROTECTED]
Subject: Re: hash
On Mar 29, 2004, at 4:03 PM, [EMAIL PROTECTED] wrote:
any ideas on how I can access say all the values
Bryan Harris wrote:
Alternatively, you can use the '-t' operator:
exit 0 if -t STDIN
I've been waiting for this for a LONG time, thanks Smoot.
- B
Excellent! Worked like a charm! This is exactly the kind of thing I was
looking for.
Thanks!
Keith P. Boruff
--
To unsubscribe,
Ron B wrote:
I'm running my own version of bulletinboard and I have a little problem
with hyperlinks. I'd like to make them really work. So if posted message
includes http://blaablaablaa it would be a hyeprlink when reader opens
the message. Messages are stored in .html files so it's quite easy
John W. Krahn [EMAIL PROTECTED] writes:
If so, how do I let the `next' know that open has failed?
That is, how do I test exit status of open function?
open() returns true on success and undef (false) when it fails.
Is it just as
in shell programing ($?)?
No.
ok, then how is it done
Charles K. Clarkson [EMAIL PROTECTED] writes:
HTH,
Definitely and thanks for the examples. I think I was making this
more complicated that it needed to be. It's slowly sinking in what
all a `return' can do.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Harry Putnam wrote:
John W. Krahn [EMAIL PROTECTED] writes:
If so, how do I let the `next' know that open has failed?
That is, how do I test exit status of open function?
open() returns true on success and undef (false) when it fails.
Is it just as
in shell programing ($?)?
No.
ok, then how
Wiggins d'Anconia [EMAIL PROTECTED] writes:
[...]
if you don't mind dieing, or I often prefer using 'unless' then I
don't need to worry about a dangling else, so similar to what you have
above,
In this case I do.
unless (open(FILE, $file)) {
warn Failed open: $!;
return;
}
Ah
[EMAIL PROTECTED] wrote:
I'm sorry, the previous subject should have been changed. My apologies.
while (FILE) {
$counter++;
}
I know this is probably simple, but how would I increment by 20? In other
words, $counter would increment 1 time for every twenty lines of the file? Any
help
Smoot Carl-Mitchell wrote:
This is not what the poster asked.
Actually, yes it is, at least part of it. He said would I increment by 20?...
$counter would increment 1 time for every twenty lines of the file?
This will increment the counter by 20
for every line of the file.
Read without
Harry Putnam wrote:
Charles K. Clarkson [EMAIL PROTECTED] writes:
HTH,
Definitely and thanks for the examples. I think I was making this
more complicated that it needed to be. It's slowly sinking in what
all a `return' can do.
Hi Harry,
Glad Charles got you squared away. I have to
Bill Metzinger wrote:
I finally got back to a Jaguar system to verify that this used to work.
...
On Jaguar systems, running psync twice says there are zero items to copy.
Thank you for your help.
If you *are* backing-up your system - please see
this first and avoid data loss. I mean Perl is
Sagar, Sanjeev wrote:
Big Thanks !
My log file looks like below
Would be better with multiple sections, and only a few representative line
per...
2004-03-26 @ 00:00:01 [EMAIL PROTECTED] -- 10881 10864 hyb01
:INFORMATIONAL
...
Script/function sql_instance_ping_final started at Fri Mar
What is happening here -
#! /usr/bin/perl
use strict;
use warnings;
my $count;
while(1) {
(++$count) ? $count += $count-- : $count += $count++;
print $count\n; exit if $count 60_000;
sleep 1;
}
__END__
-Sx-
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Smoot Carl-Mitchell wrote:
Hi Carl-Mitchell,
Please stay on the list. I will address that.
I'll take this offline, since I do not think it should be on the list
I disagree. With all due respect, you and I have not developed a personal
correspondence. There are some very good reasons for
Apparently (++$count) evaluates to 0, but I can't figure out why. So the second
expression is evaluated first. From there it's pretty self-explanatory. (++$count)
will always evaluate to TRUE, since it will only get higher, and the first expression
is evaluated.
Maybe someone can enlighten
1 - 100 of 103 matches
Mail list logo