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
Is there a pop-up or other screen so that u can show the program that u
are running is still busy.
Thanx
Hello there,
does anyone have a good example for pod documented sourcecode.
I would like to have some sort of example where I can start with.
Thanks,
Bastian
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Bastian Angerstein wrote:
does anyone have a good example for pod documented sourcecode.
I would like to have some sort of example where I can start with.
perldoc perlnewmod
includes a couple of example hints, together with other useful
suggestions.
--
Gunnar Hjalmarsson
Email:
Bastian Angerstein wrote:
Hello there,
does anyone have a good example for pod documented sourcecode.
I would like to have some sort of example where I can start with.
A good example of inline doc is in the Pod::Parser module, take a look
at it with:
perldoc -m Pod::Parser
(A usefull trick, BTW,
On 6/25/2004 6:56 PM, dan wrote:
Hi all, again!
I'm attempting to make a web page, where all the buttons are dynamic, where
dynamic I say there's 1 template button image with nothing written on it,
and I want to put requests into a html page to call a script as an image to
put text on top of the
Well, I had a feeling it *might* have been HTML related, but I knew perl had
some image manipulation modules, and I was just wondering if there was
anything that could create images for me on-the-fly, rather than go through
complicated HTML routines each time I wanted to create an image with some
I just removed my perl 5.8.0 rpm and installed 5.8.3 via binary tar. It
works fine but when I try install some rpms depends perl (like mrtg) i get
the follow error:
[EMAIL PROTECTED] root]# rpm -ivh mrtg-2.9.17-13.i386.rpm
erro: Failed dependencies:
perl = 5.004 is needed by
Charlene Gentle wrote:
Hi
Hello Charlene,
Is there a pop-up or other screen so that u can show the program that u
are running is still busy.
I think if you give us more info about what you're doing you will get
some useful responses.
Thanx
HTH
Lee.M - JupiterHost.Net
--
To unsubscribe, e-mail:
dan wrote:
Well, I had a feeling it *might* have been HTML related, but I knew perl had
some image manipulation modules, and I was just wondering if there was
anything that could create images for me on-the-fly, rather than go through
complicated HTML routines each time I wanted to create an
I just removed my perl 5.8.0 rpm and installed 5.8.3 via binary tar. It
works fine but when I try install some rpms depends perl (like mrtg) i get
the follow error:
[EMAIL PROTECTED] root]# rpm -ivh mrtg-2.9.17-13.i386.rpm
erro: Failed dependencies:
perl = 5.004 is needed by
Note: forwarded message attached.
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!---BeginMessage---
Thanks Gunnar for responding
What I am looking for is how "code wise" find the last modified file in a directory within a script. here us my script
use MIME::Lite;use Net::SMTP;
Hi All,
I wanted to check whether the user input is only a number and does contain
any alphabet/s anywhere i.e. starting, end or in-between. Can somebody tell me how to
do this?
TIA
Guruguhan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
N, Guruguhan (GEAE, Foreign National, EACOE) wrote:
Hi All,
I wanted to check whether the user input is only a number and does contain
any alphabet/s anywhere i.e. starting, end or in-between. Can somebody tell me how to
do this?
TIA
Guruguhan
Hey,
Please wrap your lines :-)
To match
F H wrote:
Gunnar Hjalmarsson wrote:
F H wrote:
I have a directory where log files are saved in on a daily basis by
a VB program. and what I need is a way to get the last file stored
into that directory. The last modified file in that directory
should do it.
perldoc -f stat
What I am
Hello all,
I have a line of text and numbers each seperated by multiple or single
spaces looks like this
abc 123 33545 789
I wanted to split the above line and store each column value in a specific
variable and later print,
Below is the code I am using but it's not working as I
Hello all,
I have a line of text and numbers each seperated by multiple or single
spaces looks like this
abc 123 33545 789
I wanted to split the above line and store each column value in a specific
variable and later print,
Below is the code I am using but it's not
On Jun 28, 2004, at 10:19 AM, Naser Ali wrote:
Hello all,
I have a line of text and numbers each seperated by multiple or single
spaces looks like this
abc 123 33545 789
I wanted to split the above line and store each column value in a
specific
variable and later print,
Below is the
From: Naser Ali mailto:[EMAIL PROTECTED] wrote:
: Hello all,
:
: I have a line of text and numbers each seperated by
: multiple or single spaces looks like this
:
: abc 123 33545 789
:
: I wanted to split the above line and store each
: column value in a specific variable and later
:
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):
Naser Ali wrote:
Any suggestions on what am I doing wrong..?
Why do you want a scalar variable for each value? Why not using an
array instead?
And you seem not to be using strictures and warnings.
Others have helped you with the pattern passed to split().
--
Gunnar Hjalmarsson
Email:
There are actually 7 fields total. The name Avg does not mean anything. I
just copied and pasted an old code to save some time in editing while
testing this functionality. Also i is a typo. should have put all the
seven fields. So this is how it should look like
abc 123 33545 789 52635
N, Guruguhan (GEAE, Foreign National, EACOE) wrote:
Hi All,
I wanted to check whether the user input is only a number and does contain
any alphabet/s anywhere i.e. starting, end or in-between. Can somebody tell me how to
do this?
Use the Regexp::Common module:
Naser Ali wrote:
I tried with, after removing i
split ' 'and split (/\s+/,$Avg) as well, but no success
In that case there is a problem also with a part of your code that you
did not show us.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe,
Thanks for your comments. It is a good idea. ultimately I was thinking of
using the array. Since I am a new bee to this, while writing small programs
I am trying to learn different aspects of the same function. Which I believe
will be good for me in the long run. and in return I ll be able to
Randy W. Sims wrote:
N, Guruguhan (GEAE, Foreign National, EACOE) wrote:
Hi All,
I wanted to check whether the user input is only a number
and does contain any alphabet/s anywhere i.e. starting, end or
in-between. Can somebody tell me how to do this?
How about simply m/^\d+$/
Below is the actual code. This is just the preliminary code to test the
logic, it is not final yet, therefore, I am not using Warnings, Strict
or for that matter anything else. Also I am slurrping the whole file, and I
know I do not have to, but alternate ways, I ll decide later.
Thanks
JupiterHost.Net wrote:
Randy W. Sims wrote:
N, Guruguhan (GEAE, Foreign National, EACOE) wrote:
Hi All,
I wanted to check whether the user input is only a number
and does contain any alphabet/s anywhere i.e. starting, end or
in-between. Can somebody tell me how to do this?
How about
On Jun 28, 2004, at 11:15 AM, Naser Ali wrote:
Below is the actual code. This is just the preliminary code to test the
logic, it is not final yet, therefore, I am not using Warnings,
Strict
or for that matter anything else.
It's easy to make excuses, harder to do the right thing. Help us help
N, Guruguhan (GEAE, Foreign National, EACOE) wrote:
Hi All,
I wanted to check whether the user input is only a number
and does contain any alphabet/s anywhere i.e. starting, end or
in-between. Can somebody tell me how to do this?
I assume you mean does NOT contain any ...
chomp(my
wow..somebody woke up on the wrong side of bed, this morning...
shesh...
Michelle Rogers
- Original Message -
From: James Edward Gray II [EMAIL PROTECTED]
To: Naser Ali [EMAIL PROTECTED]
Cc: Perl Beginners [EMAIL PROTECTED]
Sent: Monday, June 28, 2004 12:28 PM
Subject: Re: string
Naser Ali wrote:
Below is the actual code. This is just the preliminary code to test
the logic, it is not final yet, therefore, I am not using
Warnings, Strict or for that matter anything else.
That reasoning is so very, very *wrong*. Strictures and warnings are
not to be added when a program is
After all, I thought the name of this group was Perl BEGINNERS...
-Original Message-
From: Michelle Rogers [mailto:[EMAIL PROTECTED]
Sent: Monday, June 28, 2004 10:33 AM
To: James Edward Gray II; Naser Ali
Cc: Perl Beginners
Subject: Re: string seperated by multiple spaces
From: Naser Ali mailto:[EMAIL PROTECTED] wrote:
: Below is the actual code. This is just the preliminary code
: to test the logic, it is not final yet, therefore, I am not
: using Warnings, Strict or for that matter anything else.
Use strict and warnings from the very beginning. Don't
wait
On Jun 28, 2004, at 11:32 AM, Michelle Rogers wrote:
wow..somebody woke up on the wrong side of bed, this morning...
I wish I could say I was sorry. ;)
You think whatever you want of me, but I'm not wrong. I've tried
telling the person who started this thread before. Now I'm trying
something
*grins at you* yes..yes...that's what it says...unless it's false
advertising
Michelle Rogers
- Original Message -
From: MCMULLIN, NANCY [EMAIL PROTECTED]
To: Michelle Rogers [EMAIL PROTECTED]; James Edward Gray II
[EMAIL PROTECTED]; Naser Ali [EMAIL PROTECTED]
Cc: Perl Beginners [EMAIL
On Jun 28, 2004, at 11:37 AM, MCMULLIN, NANCY wrote:
After all, I thought the name of this group was Perl BEGINNERS...
Sure is. And the FIRST thing beginners need to learn is to add strict
and warnings to help them learn. It also helps us read your code,
which can only be good for you.
James
James - we do appreciate your time and help. My hope is that because of your help,
and our own training efforts, eventually we won't be sending you junk code. ;-)
-Original Message-
From: James Edward Gray II [mailto:[EMAIL PROTECTED]
Sent: Monday, June 28, 2004 10:45 AM
To: Michelle
Thanks Charles,
Now your polite comments on using warnings make me think and as well as
guilty. Also emphasizes on going an extra mile at times helps save time.
Point well taken,
But on the other hand there are people on the list like Mr. James Edward
Gray II has some ego problems. No body asked
The point is...if you're wanting to help beginnersbe nicedon't jump
down their throatsI'd prefer not to have that type of help. Use Charles
K. Clarkson, as an example. He said the exact same thing, but said it in a
way that it should be said to beginners. I guess I'm taking it upon
quote
With all due respect, if you can't, then do not help. The world will
survive
without your help.
end quote
That's my point. If help isn't given cheerfully, it does more harm than
good.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Jun 28, 2004, at 11:55 AM, Naser Ali wrote:
But on the other hand there are people on the list like Mr. James
Edward
Gray II has some ego problems. No body asked you to answer my
question. if
you really think beginners like me, for whom this list was created in
the
first place, are not
Naser Ali [EMAIL PROTECTED] wrote:
: Now your polite comments on using warnings make me think
: and as well as guilty. Also emphasizes on going an extra
: mile at times helps save time. Point well taken,
:
: But on the other hand there are people on the list like
: Mr. James Edward Gray II has
Naser Ali wrote:
But on the other hand there are people on the list like Mr. James
Edward Gray II has some ego problems. No body asked you to answer
my question. if you really think beginners like me, for whom this
list was created in the first place, are not worthy of your
expertise and
Thanks Charles,
Now your polite comments on using warnings make me think and as well as
guilty. Also emphasizes on going an extra mile at times helps save time.
Point well taken,
But on the other hand there are people on the list like Mr. James Edward
Gray II has some ego problems. No
MCMULLIN, NANCY [EMAIL PROTECTED] wrote:
: After all, I thought the name of this group was Perl BEGINNERS...
So it's not Perl Beginners for TOP POSTERS, Huh?
Imagine that. :)
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
--
To unsubscribe, e-mail: [EMAIL
Michelle Rogers wrote:
The point is...if you're wanting to help beginnersbe
nicedon't jump down their throatsI'd prefer not to have
that type of help. Use Charles K. Clarkson, as an example. He
said the exact same thing, but said it in a way that it should be
said to beginners.
MCMULLIN, NANCY [EMAIL PROTECTED] wrote:
: After all, I thought the name of this group was Perl BEGINNERS...
So it's not Perl Beginners for TOP POSTERS, Huh?
Imagine that. :)
So glad I wasn't forced to go there.
Time for this to get posted again, IM(not-so)HO, I've supplied
Can anyone share a script that recurses a filesystem for files containing one
or more patterns? Seems like it would be easy to write but if it's already
out there...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Please accept my Apollgies.
Your response did offend me, but I did not let it. So why did I write back
in an offensive and offending way..? just to make a point that your approach
was not right just like mine in responding to you. Just wanted to show that
jumping to conclusion and pre-judging is
Naser Ali wrote:
I used \s* in split, so I do not have worry about counting the
spaces or tabs between each field
I noticed something in the OP that didn't really get addressed:
\s* will match an empty string, which will split into a list of single
characters.
$ perl -le 'print for split
Hi all,
I have written an upload script using CGI.pm and it works perfect however it
looks bland. I would like ot understand how to make it look a lot nicer,
either continuing down the CGI.pm path or using some other method. Any
ideas?
TIA,
John
Hi all,
I have written an upload script using CGI.pm and it works perfect
however it
looks bland. I would like ot understand how to make it look a lot nicer,
either continuing down the CGI.pm path or using some other method. Any
ideas?
What looks bland? Pretty much everything
-Original Message-
From: Wiggins d Anconia [mailto:[EMAIL PROTECTED]
Sent: Monday, June 28, 2004 1:46 PM
To: John Pretti; [EMAIL PROTECTED]
Subject: Re: CGI.pm help
Hi all,
I have written an upload script using CGI.pm and it works perfect
however it
looks bland. I would like ot
I have a textarea on a webpage that gets stored in a database. I'd like
to convert the newline to an HTML br before it gets stored so when I
display it, the line breaks as it was typed. I've been looking around
but haven't found an example.
$text =~ s/\r\n/br/g;
doesn't work.
--charlie
--
Hi all,
I have written an upload script using CGI.pm and it works perfect
however it
looks bland. I would like ot understand how to make it look a lot nicer,
either continuing down the CGI.pm path or using some other method. Any
ideas?
What looks bland? Pretty much everything dealing with the
Charles Farinella wrote:
I have a textarea on a webpage that gets stored in a database. I'd like
to convert the newline to an HTML br before it gets stored so when I
display it, the line breaks as it was typed. I've been looking around
but haven't found an example.
$text =~ s/\r\n/br/g;
That
I'm working on a custom Perl script to parse my Apache logs and report custom
information. When I run the following program, it ends up eating all available
RAM (the system has 1GB) and dying. My access_log is ~410MB. Am I doing
something wrong?
#!/usr/bin/perl
use strict;
use warnings;
use
Maybe:
${text} =~ s#[\r\n]+#br /#g;
On 28 Jun 2004 15:13:06 -0400, Charles Farinella wrote
I have a textarea on a webpage that gets stored in a database. I'd like
to convert the newline to an HTML br before it gets stored so when
I display it, the line breaks as it was typed. I've been
I have a textarea on a webpage that gets stored in a database. I'd like
to convert the newline to an HTML br before it gets stored so when
I display it, the line breaks as it was typed. I've been looking around
but haven't found an example.
$text =~ s/\r\n/br/g;
doesn't work.
use FIle::Slurp;
Whoops :
use File::Slurp;
:)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Jupiterhost.Net wrote:
Try this:
$text =~ s/\r//g;
$text =~ s/\n/br \//g;
Why not just:
$text =~ s!\r?\n!br /!g;
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
perl.org wrote:
Can anyone share a script that recurses a filesystem for files containing one
or more patterns? Seems like it would be easy to write but if it's already
out there...
This was a recent perl QotW (Quiz of the Week) exercise. My solution can
be found at
Papo Napolitano wrote:
Charles Farinella wrote:
$text =~ s/\r\n/br/g;
doesn't work.
$text =~ s/\r\n/br/gs;
^
Why would the /s modifier make a difference? Please study
perldoc perlre
and figure out why it doesn't. ;-)
--
Gunnar Hjalmarsson
Email:
Papo Napolitano wrote:
Charles Farinella wrote:
$text =~ s/\r\n/br/g;
doesn't work.
$text =~ s/\r\n/br/gs;
^
Why would the /s modifier make a difference? Please study
perldoc perlre
and figure out why it doesn't. ;-)
perl -e '$_ =
Papo Napolitano wrote:
Gunnar Hjalmarsson wrote:
Papo Napolitano wrote:
$text =~ s/\r\n/br/gs;
---^
Why would the /s modifier make a difference? Please study
perldoc perlre
and figure out why it doesn't. ;-)
perl -e '$_ = line1\r\nline2\r\n\r\nline4; s/\r\n/br/gs; print'
Please
Gunnar Hjalmarsson wrote:
Jupiterhost.Net wrote:
Try this:
$text =~ s/\r//g;
$text =~ s/\n/br \//g;
Why not just:
$text =~ s!\r?\n!br /!g;
That'll work fine,
I've just seen that do unexpected things with lines before so I like to
kill the \r completely so the output is more predictable.
It
i want to use the sub routine to time stamp processes and such whenever
i need to. So, I wrote this below to call the routine into a variable
$process_date. Is there a better way to read the date into a variable
and use it?
Thanks,
JC
sub dateme{
$process_date=system('return date');
Guruguhan N wrote:
Hi All,
Hello,
I wanted to check whether the user input is only a
number and does contain any alphabet/s anywhere i.e. starting,
end or in-between. Can somebody tell me how to do this?
That is a Frequently Asked Question and can be found in the standard
perl
Michelle Rogers wrote:
The point is...if you're wanting to help beginnersbe nicedon't jump
down their throatsI'd prefer not to have that type of help. Use Charles
K. Clarkson, as an example. He said the exact same thing, but said it in a
way that it should be said to beginners.
Perl.Org wrote:
Can anyone share a script that recurses a filesystem for files containing one
or more patterns? Seems like it would be easy to write but if it's already
out there...
This will probably work:
#!/usr/bin/perl
use warnings;
use strict;
use File::Find;
my $dir = shift || '.';
Papo Napolitano wrote:
I have a textarea on a webpage that gets stored in a database. I'd like
to convert the newline to an HTML br before it gets stored so when
I display it, the line breaks as it was typed. I've been looking around
but haven't found an example.
$text =~
Jupiterhost.Net wrote:
Gunnar Hjalmarsson wrote:
Jupiterhost.Net wrote:
$text =~ s/\r//g;
$text =~ s/\n/br \//g;
Why not just:
$text =~ s!\r?\n!br /!g;
That'll work fine, I've just seen that do unexpected things with
lines before so I like to kill the \r completely so the output is
more
Andrew Gaffney wrote:
I'm working on a custom Perl script to parse my Apache logs and report custom
information. When I run the following program, it ends up eating all available
RAM (the system has 1GB) and dying. My access_log is ~410MB. Am I doing
something wrong?
The only problems I can
Jason Corbett wrote:
i want to use the sub routine to time stamp processes and such whenever
i need to. So, I wrote this below to call the routine into a variable
$process_date. Is there a better way to read the date into a variable
and use it?
Yes, use localtime() or POSIX::strftime().
jason corbett wrote:
i want to use the sub routine to time stamp processes and such whenever
i need to. So, I wrote this below to call the routine into a variable
$process_date. Is there a better way to read the date into a variable
and use it?
For one you should scope it if its a function.
IE
Jason Corbett wrote:
i want to use the sub routine to time stamp processes and such
whenever i need to. So, I wrote this below to call the routine into
a variable $process_date. Is there a better way to read the date
into a variable and use it?
Yes. Use Perl's built in function for the purpose:
I have a script that is automated every morning.
I want to send this out to the team without logging onto the network and emailing the
file from a shell script that i also wrote like this:
`mailx -s Email Header [EMAIL PROTECTED] filename.txt`;
so, I hear PEAL has emailing (in attachment
I just tried this on my Win2000 client machine and it gave
the following:
$VAR1 = 'Administrator';
$VAR2 = 'Mike Flannigan';
So it appeared to work to me. It made no sounds.
Mike
Subject: Win32::NetAdmin::LocalGroupGetMembers
Date: Fri, 25 Jun 2004 17:40:05 -0400
From: perl.org [EMAIL
Jason Corbett wrote:
I hear PEAL has emailing (in attachment format) capabilities? I
down-loaded the module MIME::Lite, but I am not sure how to get
this going.
How about studying the docs for the module?
Also, such a script was recently posted to this list:
On Jun 28, John W. Krahn said:
$line =~ /^(\d+\.\d+\.\d+\.\d+) (.+?) (.+?) \[(.+?)\] \(?:(.+?) )?(.+)(?:
(.+?))?\ (\d+) (.+?) \(.+?)\ \(.+?)\$/;
If you are not using $2, $3, $5, $7 and $10 why capture them? You
should probably replace .+? with something more meaningful that won't
-Original Message-
From: JupiterHost.Net [mailto:[EMAIL PROTECTED]
Sent: Monday, June 28, 2004 2:17 PM
To: John Pretti
Cc: 'Wiggins d Anconia'; [EMAIL PROTECTED]
Subject: Re: CGI.pm help
Hi all,
I have written an upload script using CGI.pm and it works perfect
however it
looks
Gunnar Hjalmarsson wrote:
Jason Corbett wrote:
I hear PEAL has emailing (in attachment format) capabilities? I
down-loaded the module MIME::Lite, but I am not sure how to get
this going.
How about studying the docs for the module?
Also, such a script was recently posted to this list:
Mike Blezien wrote:
Gunnar Hjalmarsson wrote:
Jason Corbett wrote:
I hear PEAL has emailing (in attachment format) capabilities? I
down-loaded the module MIME::Lite, but I am not sure how to
get this going.
How about studying the docs for the module?
Also, such a script was recently posted to this
That's because the SID is stored in binary, and when you try to print
it, it tries to convert that binary value into a series of characters,
one of which is the beep sound (I know it doesn't make any sense, but
it's true).
Subject: Win32::NetAdmin::LocalGroupGetMembers
Date: Fri, 25 Jun 2004
use FIle::Slurp;
print $q-header();
print read_file('../htmltop.html');
# generate content here
print read_file('../htmlbot.html');
HTH
Lee.M - JupiterHost.Net
Man That is super slick. Thanks very much that is exactly what I am
looking for.
No problem! Sorry for the misspelling the
Gunnar Hjalmarsson wrote:
Jason Corbett wrote:
I hear PEAL has emailing (in attachment format) capabilities? I
down-loaded the module MIME::Lite, but I am not sure how to get
this going.
How about studying the docs for the module?
Also, such a script was recently posted to
I have a problem with Net::Telnet ( again )
When I connect to a united linux machine the server does not recognize
terminaltype 'network' and the connection just hangs.
Can I use telnet with a terminal type vt100 in Net::Telnet
Thanks
Ram
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
88 matches
Mail list logo