Hello!
I'm beginner in perl; I mean I have absolutely no experience.
Could anybody tell me waht would be the first steps for learning perl?
I mean links, faqs, howtos, tutorials, handbooks, software, compilers,
etc. What is needed.
I am intrested to write cgi perl scripts for adding to a website
Ivanca S wrote:
I'm beginner in perl; I mean I have absolutely no experience. Could
anybody tell me waht would be the first steps for learning perl?
http://learn.perl.org/
I am intrested to write cgi perl scripts
http://cgi.resourceindex.com/Documentation/CGI_Tutorials/
--
Gunnar
You should, ah, ace that homework with the kind of help you got on this one :-)
On Wed, 6 Oct 2004 09:06:52 +0800, Bee [EMAIL PROTECTED] wrote:
Try this and hope this would help more *Code not tested*
Suppose data in cancel.txt :
123456|X
234567|X
Suppose data in falldata.tmp :
On Tue, Oct 05, 2004 at 02:25:08PM -0700, James Taylor wrote:
Here's a better example of something that actually might serve a bit
more purpose along with the error I'm getting for THIS
particular example.
sub genrand {
my [EMAIL PROTECTED]; my $r;
I'm not sure that this will solve
On Oct 5, 2004, at 10:31 AM, Michael Glaesemann wrote:
Hello! I'm having some difficulty installing IPC::Run on Mac OS X
10.3.5.
As no one at [EMAIL PROTECTED] has responded to my post, perhaps this
isn't the appropriate mailing list for this question. Could someone
suggest a more appropriate
On Tue, 05 Oct 2004 15:22:25 -0700, John W. Krahn [EMAIL PROTECTED] wrote:
[Please do not top-post. TIA]
David le Blanc wrote:
On Tue, 05 Oct 2004 04:03:21 -0700, John W. Krahn [EMAIL PROTECTED] wrote:
Mallik wrote:
I have the below code.
my $a = :-:m:-:a:-:l:-:i:-:k; # Here
My brain is broken today.
I have a file with a list of installed rpm packages, some of them are
duplicated and I want to sort the file/llist and print ones that have the
same name, like:
yum-2.0.7
yum-2.0.8
Then I am going to clean up the rpmdb
Any tips, apart from reading my llama book ;-)
Gavin Henry said:
My brain is broken today.
I have a file with a list of installed rpm packages, some of them are
duplicated and I want to sort the file/llist and print ones that have the
same name, like:
yum-2.0.7
yum-2.0.8
Then I am going to clean up the rpmdb
Any tips, apart from
rmck wrote:
Hello,
Hello,
Im trying to sum up a column from my results. Help.
current output:
Date_Time, SRCIP, DSTIP, TOTALBYTES
01-01-2004 12:56:48, 192.168.1.1, 192.168.2.2, 2768
Sum Of Bytes = 2768
01-01-2004 12:56:48, 192.168.2.2, 192.168.1.1, 438
Sum Of Bytes = 876
01-02-2004 16:49:45,
Hi
I am in process of creating a template Say a HTML template...pasting one sample line
below.
td width=1 bgcolor=#[%topColor%]img border=0
src=[%1x1_image%] width=1 height=100%/td
and there is one text file(config.txt) has several entries
1x1_image=/images/temp_white.gif
Gavin Henry
[EMAIL PROTECTED]An: [EMAIL PROTECTED]
Sorry to post again on a new thread, but I think I need to clear my basci
problem up.
I want to read in a file and print repeated lines like:
yum
yum
or
xorg-x11
xorg-x11
What's the best way to do this? A RE or a module from CPAN?
--
Just getting into the best language ever...
Fancy a
On Wed, Oct 06, 2004 at 01:42:43PM +0100, Gavin Henry wrote:
I want to read in a file and print repeated lines like:
yum
yum
or
xorg-x11
xorg-x11
What's the best way to do this? A RE or a module from CPAN?
uniq -d
Or, if you aren't on a system where that is available, use the
Paul Johnson said:
On Wed, Oct 06, 2004 at 01:42:43PM +0100, Gavin Henry wrote:
I want to read in a file and print repeated lines like:
yum
yum
or
xorg-x11
xorg-x11
What's the best way to do this? A RE or a module from CPAN?
uniq -d
Or, if you aren't on a system where that is
Anish Kumar K. wrote:
I am in process of creating a template Say a HTML
template...pasting one sample line below.
td width=1 bgcolor=#[%topColor%]img border=0
src=[%1x1_image%] width=1 height=100%/td
and there is one text file(config.txt) has several entries
1x1_image=/images/temp_white.gif
Bee,
Thanks much for your explanation of where I was going wrong in the foreach
loops.
cancel.txt contains 2 fields
028076|C
What I ended up doing was:
First looping through %course_info
Then looping through the array of canceled courses
If there was a match, I changed the value in the hash
this does not work:
sub extract{
#retrieve subset of data from a single file
#return that data in a list context
my $fh = shift; #filehandle reference
my @creds;
local $/ = 'entry';
@creds = grep {/./} $fh;
@creds
}
this does work::
sub
William M West wrote:
this does not work:
sub extract{
#retrieve subset of data from a single file
#return that data in a list context
my $fh = shift; #filehandle reference
my @creds;
local $/ = 'entry';
@creds = grep {/./} $fh;
Try:
@creds =
@creds = grep {/./} $fh;
Try:
@creds = grep {/./} $fh;
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
ah!! i was so used to that /not/ being the case with a normal
filehandle that i didn't think to use it with a reference
*laugh*
thank you :)
William M West wrote:
Gunnar Hjalmarsson wrote:
William M West wrote:
@creds = grep {/./} $fh;
Try:
@creds = grep {/./} $fh;
ah!! i was so used to that /not/ being the case with a normal
filehandle
Don't understand. Which syntax(es) are you referring to when saying that?
thank you :)
Hi;
I have a Fedora Core 2 full install to which I installedXML::Simple
manually (ie: download, extract, perl Makefile.PL, make, make test, sudo
make install). Some of the tests did not run since I did not have
Tie::IxHash (?) installed. The error message (could not find
ParserDetails.ini
On Oct 5, 2004, at 10:31 AM, Michael Glaesemann wrote:
Hello! I'm having some difficulty installing IPC::Run on Mac OS X
10.3.5.
As no one at [EMAIL PROTECTED] has responded to my post, perhaps this
isn't the appropriate mailing list for this question. Could someone
suggest a more
Hi there!
I'm fairly new to Perl and need some help to acomplish a (simple?) task.
I extract strings from some logfiles, namely an ip-adress and bytes, by
using regexes. I use a hash to store ip-adress and associated bytes.
First i packed all logs in a temporary file but it was getting too big.
Folker Naumann wrote:
Hi there!
Hello,
I'm fairly new to Perl and need some help to acomplish a (simple?) task.
I extract strings from some logfiles, namely an ip-adress and bytes, by
using regexes. I use a hash to store ip-adress and associated bytes.
Sounds like you have the hard part done
You have to export the variable if you want perl to recognize it!
Example:
$ ABC=xyz
$ perl -e 'print $ENV{ABC}\n'
$ export ABC=xyz
$ perl -e 'print $ENV{ABC}\n'
xyz
$
-Jeff
On Tue, 05 Oct 2004 15:30:59 -0700, John W. Krahn [EMAIL PROTECTED] wrote:
Folker Naumann [EMAIL PROTECTED] wrote:
: I'm fairly new to Perl and need some help to acomplish a
: (simple?) task.
:
: I extract strings from some logfiles, namely an ip-adress
: and bytes, by using regexes. I use a hash to store
: ip-adress and associated bytes. First i packed all logs
: in
JupiterHost.Net wrote:
Instead of createing a new file that has each fuile in it (doubling the
space and memeory used) process them one ata time:
my %ipbytes = ();
for my $file(@logfiles) {
open LOG, $file or die $1;
while(LOG) {
my ($ip,$bytes) = split /\:/, $_; # or however you get
Always always always:
use strict;
use warnings;
(...)
foreach $file (@sortlist){
my @sortlist = ...
my %ipload =();
foreach my $file (@sortlist) {
open(LOG,$file) or die Can't open $file: $!\n;
@lines = LOG;
my @lines = LOG;
foreach my $logline (reverse(@lines)) {
#Search for
Hello everybody!
My intention is to have thread support in Perl, reding through CPAN I
must have a Perl version compiled with support to threads. I made a
script and I have the following output
This Perl hasn't been configured and built properly for the threads
module to work. (The
JupiterHost.Net wrote:
Always always always:
use strict;
use warnings;
Sorry, i just used (...) to indicate that i left out some lines of code.
Including use strict, use warnings and all initialisations.
foreach my $logline (reverse(@lines)) {
#Search for Host-IP-Adress and bytes
if(
Ken Wolcott wrote:
Hi;
I have a Fedora Core 2 full install to which I installedXML::Simple
manually (ie: download, extract, perl Makefile.PL, make, make test,
sudo make install). Some of the tests did not run since I did not
have Tie::IxHash (?) installed. The error message (could not find
On 10/6/2004 6:21 PM, Eduardo Vázquez Rodríguez wrote:
I have the following questions
1. Doing that, how do I use the new perl binary 5.8.5 instead of the old
5.8.0?
I believe that /usr/local/bin/perl is pointing to the older version
instead of the newer
It's just a link to the versioned
Always always always:
use strict;
use warnings;
Sorry, i just used (...) to indicate that i left out some lines of code.
Including use strict, use warnings and all initialisations.
Then how did the code you posted work? Non of it was initialized with
the scope it should have been. (IE any of
Try this
foreach $file (@sortlist){
open(LOG,$file) or die Can't open $file: $!\n;
@lines = LOG;
foreach my $logline (reverse(@lines)) {
#Search for Host-IP-Adress and bytes
if( $logline =~ / (\d+\.\d+\.\d+\.\d+) \w*\/\w* (\d+) [A-Z]+/ ){
if($ipload{$1}) {$ipload{$1}+=$2}
dear all,
i want to dial automatically to phone through my PC getting numbers
from text/etc. file.
how could i do it in PERL.
thanks
Adam
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
[Please do not top-post. TIA]
Jeff Westman wrote:
On Tue, 05 Oct 2004 15:30:59 -0700, John W. Krahn wrote:
Jim wrote:
Willy Perez wrote:
Is there a method to pass a shell assigned variable to perl?
For ex:
ABC=xyc
perl -ne 'print $ABC'
In awk you could use ENVIRON[varname], is there something
Well, I've made some changes... not sure if it was for the better but at
least I'm learning from the research! :-)
I don't think the split is really doing anything (but I'd like it to.. :-) )
and my format STDOUT is producing the error Use of uninitialized value in
formline... ?? not sure what
I am not sure what the best way to tackle this problem so here it goes...
I want to use the user's input to replace a string value in the registry.
The problem is locating the subkey. There is one location that I need to
change the string value:
\\HKLM\SOFTWARE\Funk Software,
I am not sure what the best way to tackle this problem so here it goes...
I want to use the user's input to replace a string value in the registry.
The problem is locating the subkey. There is one location that I need to
change the string value:
\\HKLM\SOFTWARE\Funk Software,
Hi All,
I have a database file, some_sch.txt that is arranged like this:
username1
First Last
Some Community Sch
1000 S Adams St
Town, Indiana 12345 U.S.A.
username2
First Last
Some Community Sch
1000 S Adams St
Town, Indiana 12345 U.S.A.
username3
First Last
Marion Community Sch
I'm using POD for the first time. Unlike POD's counterparts for C# and Java
programming, POD is pretty unstructured.
(1) Are there some favorite examples to follow? For example, I learned from
looking at CGI.pm, but was surprised that there was not set of comments
preceding each function that
On Oct 7, 2004, at 4:02 AM, Wiggins d Anconia wrote:
[EMAIL PROTECTED] might turn up more responders,
http://lists.perl.org/showlist.cgi?name=macosx
Thank you. I'll try there next.
It appeared from the output that a test that should fail didn't.
Interesting. I hadn't noticed that before, but now
On Thu, 7 Oct 2004, Adam Saeed wrote:
dear all,
i want to dial automatically to phone through my PC getting numbers
from text/etc. file.
how could i do it in Perl?
* Perl is the language, perl is the program that implements it.
PERL is not a word; please do not capitalize it.
* Questions end in
43 matches
Mail list logo