Re: newbie question for parsing incoming mails

2017-02-16 Thread Jim Gibson
> On Feb 15, 2017, at 9:56 PM, Eko Budiharto wrote: > > Jim, > I have one a couple more questions. > -. For the header, what if, I just need the subject, the from, and the > recipient, what is the command? I read the manual in the >

Re: newbie question for parsing incoming mails

2017-02-15 Thread Eko Budiharto
dear all, I have one a couple questions. -. For the header, what if, I just need the subject, the from, and the recipient, what is the command? I read the manual in the https://metacpan.org/pod/Email::MIME#header , it does not tell me how to extract

Re: newbie question for parsing incoming mails

2017-02-15 Thread Jim Gibson
On Feb 15, 2017, at 7:10 PM, Eko Budiharto wrote: > > Jim, > if I want to extract all incoming emails from my qmail emails, how can > specify the folder location and specify the file name since the file name > always different? > > Thx. Use File::Find or opendir and

Re: newbie question for parsing incoming mails

2017-02-15 Thread Jim Gibson
> On Feb 15, 2017, at 8:10 PM, Eko Budiharto wrote: > > dear Jim, > I tried to add lines to read file like this: > > use Email::MIME; > > my $file = '/var/qmail/mailnames/

Re: newbie question for parsing incoming mails

2017-02-15 Thread Eko Budiharto
dear Jim, I tried to add lines to read file like this: use Email::MIME; my $file = '/var/qmail/mailnames//support/Maildir/cur/1487041394.M984019P23084V0803I00E03878.ABCD.NET,S=3987:2,'; open my $ifh, '<', $file or die "Cannot open '$file' for reading: $!"; local $/ = ''; my

Re: newbie question for parsing incoming mails

2017-02-15 Thread Eko Budiharto
Jim, if I want to extract all incoming emails from my qmail emails, how can specify the folder location and specify the file name since the file name always different? Thx. > On Feb 15, 2017, at 22:56, Jim Gibson wrote: > >> >> On Feb 14, 2017, at 10:38 PM, Eko

Re: newbie question for parsing incoming mails

2017-02-15 Thread Andy Bach
> when I run it, I do not get anything. Hmm, how are you testing it. I put a single header and msg in /tmp/ml.txt (Subject: training.error Trouble wiwb) and: $ parse_email_simple.pl < /tmp/ml.txt training.error Trouble wiwb (8 lines) $ cat /tmp/ml.txt | parse_email_simple.pl training.error Trouble

Re: newbie question for parsing incoming mails

2017-02-15 Thread Jim Gibson
> On Feb 14, 2017, at 10:38 PM, Eko Budiharto wrote: > > dear all, > I have a question. > If I would like to parse all incoming mails from my qmail, which perl module > is easy to use? > my qmail emails incoming is /var/qmail/mailnames//support. In > this folder I

newbie question for parsing incoming mails

2017-02-14 Thread Eko Budiharto
dear all, I have a question. If I would like to parse all incoming mails from my qmail, which perl module is easy to use? my qmail emails incoming is /var/qmail/mailnames//support. In this folder I already have preline in .qmail for piping emails to my perl script. And, my perl script what I

Re: newbie pipe stdin to sendmail

2016-11-03 Thread Mark Coetser
On 02/11/2016 22:14, Andy Bach wrote: #!/usr/bin/perl my $vacation_forward = 'vacat...@domain.com '; open(OUT, "|/usr/sbin/sendmail $vacation_forward") or die ("Can't sendmail - $!"); my $email_addr_to = ''; while ( <>) { $email_addr_to = $1 if /^To: (.*)$/; print

Re: newbie pipe stdin to sendmail

2016-11-02 Thread Mark Coetser
On 02/11/2016 19:35, Andy Bach wrote: On Wed, Nov 2, 2016 at 9:13 AM, Mark Coetser > wrote: $parser->ignore_errors(1); $parser->output_to_core(1); my $entity = $parser->parse(\*STDIN); my $error = ($@ || $parser->last_error);

newbie pipe stdin to sendmail

2016-11-02 Thread Mark Coetser
Hi OK, complete newbie to perl. I am busy playing around/learning and I wanted to create a simple perl script that I can pipe an email too and then grab the To header and output that and then pipe the unmodified email to sendmail with a different recipient... similar to cat /var/mail

Re: Newbie creating Perl web report

2014-02-07 Thread Octavian Rasnita
: Friday, February 07, 2014 8:30 AM Subject: Newbie creating Perl web report Hello everyone, I'm somewhat confused on a topic of CGI vs a web frame work for creating simple applications. I've been reading Beginning Perl by Ovid and seems like it's recommend to use a frame work instead

Re: Newbie creating Perl web report

2014-02-07 Thread Chankey Pathak
choose depending on your needs. --Octavian - Original Message - *From:* Robert Freiberger rfreiber...@gmail.com *To:* begin Perl Beginners beginners@perl.org *Sent:* Friday, February 07, 2014 8:30 AM *Subject:* Newbie creating Perl web report Hello everyone, I'm somewhat confused

Re: Newbie creating Perl web report

2014-02-07 Thread Robert Freiberger
there is more than one way and you can choose depending on your needs. --Octavian - Original Message - *From:* Robert Freiberger rfreiber...@gmail.com *To:* begin Perl Beginners beginners@perl.org *Sent:* Friday, February 07, 2014 8:30 AM *Subject:* Newbie creating Perl web report Hello

Newbie creating Perl web report

2014-02-06 Thread Robert Freiberger
Hello everyone, I'm somewhat confused on a topic of CGI vs a web frame work for creating simple applications. I've been reading Beginning Perl by Ovid and seems like it's recommend to use a frame work instead of the older method of CGI module. Is frame works like Mojolicious or Flask the new

Re: hello from a newbie

2013-10-27 Thread Dr.Ruud
On 2013-10-27 04:00, Mayuresh Kathe wrote: #!/usr/bin/perl -w use strict; use warnings; my $exponent = $ARGV[0]; my $number = 2; my $result = $number; if ( not defined $exponent ) { die Usage: $0 exponent\n; } You have a die() there, so no indent needed. Alternative: #

Re: hello from a newbie

2013-10-27 Thread Mayuresh Kathe
On Sun, Oct 27, 2013 at 03:27:49PM +0100, Dr.Ruud wrote: On 2013-10-27 04:00, Mayuresh Kathe wrote: #!/usr/bin/perl -w use strict; use warnings; my $exponent = $ARGV[0]; my $number = 2; my $result = $number; if ( not defined $exponent ) { die Usage: $0 exponent\n; }

hello from a newbie

2013-10-26 Thread Mayuresh Kathe
? if not, are there any better books out there, for a newbie to perl and for someone returning to programming after a gap of more than 7 years. thanks, ~mayuresh -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: hello from a newbie

2013-10-26 Thread Shlomi Fish
recommended. would i be right in my assumption about the o'reilly books being good? if not, are there any better books out there, for a newbie to perl and for someone returning to programming after a gap of more than 7 years. Well, I don't know what you mean by The series by O’Reilly. O'Reilly

Re: hello from a newbie

2013-10-26 Thread Mayuresh Kathe
and mastering perl and found the series by o'reilly to be quite well recommended. would i be right in my assumption about the o'reilly books being good? if not, are there any better books out there, for a newbie to perl and for someone returning to programming after a gap of more than 7 years

Re: hello from a newbie

2013-10-26 Thread Bob goolsby
for books on learning and mastering perl and found the series by o'reilly to be quite well recommended. would i be right in my assumption about the o'reilly books being good? if not, are there any better books out there, for a newbie to perl and for someone returning to programming after a gap of more

Re: hello from a newbie

2013-10-26 Thread htchd7ji
recommended. would i be right in my assumption about the o'reilly books being good? if not, are there any better books out there, for a newbie to perl and for someone returning to programming after a gap of more than 7 years. thanks, ~mayuresh -- To unsubscribe, e-mail: beginners

Re: hello from a newbie

2013-10-26 Thread Mayuresh Kathe
with perl. i've been searching for books on learning and mastering perl and found the series by o'reilly to be quite well recommended. would i be right in my assumption about the o'reilly books being good? if not, are there any better books out there, for a newbie to perl and for someone

Re: hello from a newbie

2013-10-26 Thread Shawn H Corey
On Sat, 26 Oct 2013 07:28:09 -0400 htchd...@live.com wrote: How about python? Many people consider it's better than Perl and it becomes more and more popular. This is why: $ python Python 2.7.4 (default, Sep 26 2013, 03:20:26) [GCC 4.7.3] on linux2 Type help, copyright, credits or license

Re: hello from a newbie

2013-10-26 Thread Paul Johnson
On Sat, Oct 26, 2013 at 04:47:47PM +0530, Mayuresh Kathe wrote: btw, most people and web pages don't mention it, but, mastering algorithms with perl is also supposedly a good book, though only a very old edition is available. It is, indeed, and excellent book. And it doesn't really matter if

Re: hello from a newbie

2013-10-26 Thread Shawn H Corey
On Sat, 26 Oct 2013 16:06:56 +0530 Mayuresh Kathe mayur...@kathe.in wrote: i've been searching for books on learning and mastering perl and found the series by o'reilly to be quite well recommended. Another O'Reilly book is Perl Best Practice by Damian Conway. Much of this book has been

Re: hello from a newbie

2013-10-26 Thread Robert Freiberger
I really enjoyed reading this book by Ovid. http://ofps.oreilly.com/titles/9781118013847/ Felt it was much easier to understand then the Learning Perl 6th edition I was reading before. On Sat, Oct 26, 2013 at 7:54 AM, Shawn H Corey shawnhco...@gmail.comwrote: On Sat, 26 Oct 2013 16:06:56

Re: hello from a newbie

2013-10-26 Thread Mayuresh Kathe
On Sat, Oct 26, 2013 at 10:54:12AM -0400, Shawn H Corey wrote: On Sat, 26 Oct 2013 16:06:56 +0530 Mayuresh Kathe mayur...@kathe.in wrote: i've been searching for books on learning and mastering perl and found the series by o'reilly to be quite well recommended. Another O'Reilly book is

Re: hello from a newbie

2013-10-26 Thread John SJ Anderson
to be quite well recommended. would i be right in my assumption about the o'reilly books being good? if not, are there any better books out there, for a newbie to perl and for someone returning to programming after a gap of more than 7 years. thanks, ~mayuresh -- To unsubscribe, e-mail

Re: hello from a newbie

2013-10-26 Thread John SJ Anderson
On Sat, Oct 26, 2013 at 9:08 AM, Mayuresh Kathe mayur...@kathe.in wrote: A pseudo-tangential question; Under the platform, I could do apt-get install perltidy to install perltidy, but there's nothing similar for perlcritic. Is perlcritic packaged under a different name? or is there a

Re: hello from a newbie

2013-10-26 Thread Shawn H Corey
On Sat, 26 Oct 2013 14:13:51 -0700 John SJ Anderson geneh...@genehack.org wrote: You should also know that, Shawn's endorsement not withstanding, many people consider the advice given in Perl Best Practices to be a bit of a mixed bag. There are some good tips in there, but they're mixed in

Re: hello from a newbie

2013-10-26 Thread htchd7ji
I'm a newbie of programming and want to know the differences between these 2 tools. I believe every newbie is curious to know the truth instead of some junk posts online. What's the big deal to compare these 2 languages? Simply because this is an old topic? On Oct 26, 2013, at 5:08 PM

Re: hello from a newbie

2013-10-26 Thread Shawn H Corey
On Sat, 26 Oct 2013 17:24:34 -0400 htchd...@live.com wrote: What's the big deal to compare these 2 languages? Simply because this is an old topic? Because some of the early advocates for Python trash-talked Perl. And Perlers, wanting to show that they can be equally immature, trash-talked

Re: hello from a newbie

2013-10-26 Thread John SJ Anderson
On Sat, Oct 26, 2013 at 2:18 PM, Shawn H Corey shawnhco...@gmail.com wrote: There are many things in it, like Don't use the two-argument open, which are relevant. part of the problem is that many of the older Perl sources are out of date. PBP does tell what to use instead. All of the Perl

Re: hello from a newbie

2013-10-26 Thread John SJ Anderson
On Sat, Oct 26, 2013 at 2:24 PM, htchd...@live.com wrote: I'm a newbie of programming and want to know the differences between these 2 tools. I believe every newbie is curious to know the truth instead of some junk posts online. What's the big deal to compare these 2 languages? Simply

Re: hello from a newbie

2013-10-26 Thread David Christensen
assumption about the o'reilly books being good? if not, are there any better books out there, for a newbie to perl and for someone returning to programming after a gap of more than 7 years. Computer programming for fun and profit is a worthy challenge. I learned Perl from Learning Perl, Perl

Re: hello from a newbie

2013-10-26 Thread David Christensen
On 10/26/13 04:31, Mayuresh Kathe wrote: I have watched Python programmers pull their hair out trying to bring the performace upto acceptable limits and resource usage under control. As soon as their programs increase in complexity, the problems with Python start becoming evident. IMNSHO I've

Re: hello from a newbie

2013-10-26 Thread Mayuresh Kathe
On Sat, Oct 26, 2013 at 02:13:51PM -0700, John SJ Anderson wrote: On Sat, Oct 26, 2013 at 9:08 AM, Mayuresh Kathe mayur...@kathe.in wrote: A pseudo-tangential question; Under the platform, I could do apt-get install perltidy to install perltidy, but there's nothing similar for perlcritic.

Re: hello from a newbie

2013-10-26 Thread Mayuresh Kathe
On Sat, Oct 26, 2013 at 10:54:12AM -0400, Shawn H Corey wrote: On Sat, 26 Oct 2013 16:06:56 +0530 Mayuresh Kathe mayur...@kathe.in wrote: i've been searching for books on learning and mastering perl and found the series by o'reilly to be quite well recommended. Another O'Reilly book is

Re: hello from a newbie

2013-10-26 Thread Rob Dixon
On 26/10/2013 13:59, Shawn H Corey wrote: On Sat, 26 Oct 2013 07:28:09 -0400 htchd...@live.com wrote: How about python? Many people consider it's better than Perl and it becomes more and more popular. This is why: Why what? I assume you're promoting Python, which is a bit strange on this

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-05 Thread Phil Pinkerton
On Jul 4, 2012, at 6:02 PM, David Precious wrote: On Wed, 4 Jul 2012 17:01:35 -0400 Phil Pinkerton pcpinker...@gmail.com wrote: Very nice to know about CPAN. IMO, CPAN is one of Perl's strongest features :) got a syntax error though with your script syntax error at

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-05 Thread Phil Pinkerton
On Jul 4, 2012, at 5:46 PM, Chris Charley wrote: Phil Pinkerton wrote in message news:7a962da1-a5fb-4046-bbf5-f888dd715...@gmail.com... Very nice to know about CPAN. got a syntax error though with your script syntax error at ./getACLinfo.pl line 51, near say join Execution of

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-05 Thread David Precious
On Thu, 5 Jul 2012 09:30:01 -0400 Phil Pinkerton pcpinker...@gmail.com wrote: ok using the example input file I got errors Use of uninitialized value $current_resource in string eq at /Library/Perl/5.12/SVN/Access.pm line 70, ACL line 3. [...] Invalid resource format in ! (format

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-05 Thread Phil Pinkerton
On Jul 5, 2012, at 10:46 AM, David Precious wrote: On Thu, 5 Jul 2012 09:30:01 -0400 Phil Pinkerton pcpinker...@gmail.com wrote: ok using the example input file I got errors Use of uninitialized value $current_resource in string eq at /Library/Perl/5.12/SVN/Access.pm line 70, ACL line 3.

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-05 Thread Phil Pinkerton
On Jul 5, 2012, at 10:46 AM, David Precious wrote: On Thu, 5 Jul 2012 09:30:01 -0400 Phil Pinkerton pcpinker...@gmail.com wrote: ok using the example input file I got errors Use of uninitialized value $current_resource in string eq at /Library/Perl/5.12/SVN/Access.pm line 70, ACL line 3.

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-05 Thread Phil Pinkerton
On Jul 5, 2012, at 10:46 AM, David Precious wrote: On Thu, 5 Jul 2012 09:30:01 -0400 Phil Pinkerton pcpinker...@gmail.com wrote: ok using the example input file I got errors Use of uninitialized value $current_resource in string eq at /Library/Perl/5.12/SVN/Access.pm line 70, ACL line 3.

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-04 Thread Phil Pinkerton
Very nice to know about CPAN. got a syntax error though with your script syntax error at ./getACLinfo.pl line 51, near say join Execution of ./getACLinfo.pl aborted due to compilation errors. [code] #!/usr/bin/perl use strict; use SVN::Access; my $acl = SVN::Access-new( acl_file = 'data' ); #

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-04 Thread Chris Charley
Phil Pinkerton wrote in message news:7a962da1-a5fb-4046-bbf5-f888dd715...@gmail.com... Very nice to know about CPAN. got a syntax error though with your script syntax error at ./getACLinfo.pl line 51, near say join Execution of ./getACLinfo.pl aborted due to compilation errors. [code]

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-04 Thread David Precious
On Wed, 4 Jul 2012 17:01:35 -0400 Phil Pinkerton pcpinker...@gmail.com wrote: Very nice to know about CPAN. IMO, CPAN is one of Perl's strongest features :) got a syntax error though with your script syntax error at ./getACLinfo.pl line 51, near say join Execution of ./getACLinfo.pl

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-04 Thread Phil Pinkerton
Wow I am impressed on the 4th of July no-less I have revision 5 version 14 subversion 2 on linux and v5.12.3 on my mac On Jul 4, 2012, at 5:46 PM, Chris Charley wrote: Phil Pinkerton wrote in message news:7a962da1-a5fb-4046-bbf5-f888dd715...@gmail.com... Very nice to know about CPAN.

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-04 Thread Phil Pinkerton
Phil Pinkerton wrote in message news:7a962da1-a5fb-4046-bbf5-f888dd715...@gmail.com... Very nice to know about CPAN. got a syntax error though with your script syntax error at ./getACLinfo.pl line 51, near say join Execution of ./getACLinfo.pl aborted due to compilation errors.

Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-03 Thread Phil Pinkerton
I was given a project that seems to require Perl I could use a sample just to extract a list of names associated with a group or repo and print them. 1) Assigned a task to extract data fron a text file. 2) Output file needs to be very specific, and created monthly 3) tried doing in korn shell

Re: Newbie Where to start perhaps a hash-table is what I need to learn about ?

2012-07-03 Thread David Precious
On Tue, 3 Jul 2012 09:47:00 -0400 Phil Pinkerton pcpinker...@gmail.com wrote: I was given a project that seems to require Perl I could use a sample just to extract a list of names associated with a group or repo and print them. 1) Assigned a task to extract data fron a text file. 2)

Newbie needs help

2011-03-22 Thread Geospectrum
Hi am am setting up a small website and have set up formmail.pl to create a way of people asking questions. I'd like now to add a way of visitors to display a HTML page by entering a number (invoice number) into a HTML form and then retrieve a html page. So I create a html page called

Re: Newbie needs help

2011-03-22 Thread shawn wilson
On Tue, Mar 22, 2011 at 1:05 PM, Geospectrum alan.hunt...@geospectrum.co.uk wrote: Hi am am setting up a small website and have set up formmail.pl to create a way of people asking questions. I'd like now to add a way of visitors to display a HTML page by entering a number (invoice number)

Re: Newbie needs help

2011-03-22 Thread Randal L. Schwartz
Geospectrum == Geospectrum alan.hunt...@geospectrum.co.uk writes: Geospectrum Hi am am setting up a small website and have set up formmail.pl to Geospectrum create a way of people asking questions. I'm so very much hoping that you're not using Matt Wright's original formmail.pl, and instead

Re: Newbie queries

2011-01-27 Thread dolphin
On Jan 25, 6:43 pm, orasn...@gmail.com (Octavian Rasnita) wrote: From: dolphin yc282...@yahoo.com.sg Hi, I'm learning perl now and would like to find out how to perform the following if given in a text file? ,12 ,437 ,124 ,45 ,789 ,67 CCC,567

Re: Newbie queries

2011-01-27 Thread Octavian Rasnita
From: dolphin yc282...@yahoo.com.sg Hi, Correct me that the 2 in the following means read? : my ( $label, $value ) = split /,/, $line, 2; 2 means that the result of the split() function will be a list with 2 elements. You could also use the split() function without that third parameter that

Newbie queries

2011-01-25 Thread dolphin
Hi, I'm learning perl now and would like to find out how to perform the following if given in a text file? ,12 ,437 ,124 ,45 ,789 ,67 CCC,567 DDD,5 How to sum up the 2nd column based on the 1st column with the following result: : BBB: CCC: DDD: Thanks in

Re: Newbie queries

2011-01-25 Thread Octavian Rasnita
From: dolphin yc282...@yahoo.com.sg Hi, I'm learning perl now and would like to find out how to perform the following if given in a text file? ,12 ,437 ,124 ,45 ,789 ,67 CCC,567 DDD,5 How to sum up the 2nd column based on the 1st column with the following result:

Re: Newbie queries

2011-01-25 Thread Mariano Loza Coll
On Tue, Jan 25, 2011 at 2:43 AM, Octavian Rasnita orasn...@gmail.com wrote: From: dolphin yc282...@yahoo.com.sg Hi, I'm learning perl now and would like to find out how to perform the following if given in a text file? ,12 ,437 ,124 ,45 ,789 ,67 CCC,567

Re: path names in a perl-script: a newbie-question regarding I-O convertions on OpenSuse Linux 11.3

2010-10-02 Thread jobst müller
An: beginners@perl.org Betreff: Re: path names in a perl-script: a newbie-question At 1:29 AM +0200 10/2/10, jobst müller wrote: Hi all i am new to the list! i am new to Linux and new to PERL too. I am trying to get this perl script up and running. I have installed OpenSuse-Linux 11.3 What is wanted: I

Re: path names in a perl-script: a newbie-question regarding I-O convertions on OpenSuse Linux 11.3

2010-10-02 Thread Alexey Mishustin
2.10.2010, 13:57:54, jobst müller wrote: #!/usr/bin/perl use strict; use warnings; use diagnostics; use File::Find::Rule; my @files = File::Find::Rule-file() -name('*.html') -in( 'home/usr/perl/html.files' ); -in( '/home/usr/perl/html.files' ); foreach my $file(@files) { print

Re: path names in a perl-script: a newbie-question regarding I-O convertions on OpenSuse Linux 11.3

2010-10-02 Thread Alexey Mishustin
2.10.2010, 15:22:03, Alexey Mishustin wrote: 2.10.2010, 13:57:54, jobst müller wrote: #!/usr/bin/perl use strict; use warnings; use diagnostics; use File::Find::Rule; my @files = File::Find::Rule-file() -name('*.html') -in( 'home/usr/perl/html.files' ); -in(

Re: path names in a perl-script: a newbie-question regarding I-O convertions on OpenSuse Linux 11.3

2010-10-02 Thread jobst müller
crazy - what is wrong here!? Love to hear from you best regards -Ursprüngliche Nachricht- Von: Alexey Mishustin shum...@shumkar.ru Gesendet: 02.10.2010 13:27:23 An: beginners@perl.org Betreff: Re: path names in a perl-script: a newbie-question regarding I-O convertions on OpenSuse

Re: path names in a perl-script: a newbie-question regarding I-O convertions on OpenSuse Linux 11.3

2010-10-02 Thread Jim Gibson
At 5:40 PM +0200 10/2/10, jobst müller wrote: Hello Alex many thanks for the answer. well i put all to home usr perl Please trim your replies and eliminate old material that is not relevant. Thanks. So here we go: i start them in the console like the following and get the following

Re: path names in a perl-script: a newbie-question regarding I-O convertions on OpenSuse Linux 11.3

2010-10-02 Thread Brandon McCaig
On Sat, Oct 2, 2010 at 11:40 AM, jobst müller floo...@web.de wrote: Hello Alex many thanks for the answer. well i put all to home usr perl /home/usr is a pretty strange path. Typically, the subdirectories of /home represent individual users' home directory. For example, /home/jmüller, or

path names in a perl-script: a newbie-question

2010-10-01 Thread jobst müller
Hi all i am new to the list! i am new to Linux and new to PERL too. I am trying to get this perl script up and running. I have installed OpenSuse-Linux 11.3 What is wanted: I have a bunch of HTML-files, stored in a folder. with the Perl-Script (see below) i want to parse the HTML-files. I

Re: path names in a perl-script: a newbie-question

2010-10-01 Thread Jim Gibson
At 1:29 AM +0200 10/2/10, jobst müller wrote: Hi all i am new to the list! i am new to Linux and new to PERL too. I am trying to get this perl script up and running. I have installed OpenSuse-Linux 11.3 What is wanted: I have a bunch of HTML-files, stored in a folder. with the Perl-Script

Re: Newbie: Perl how evaluate files newer than an hour within ftp

2010-08-18 Thread Shlomi Fish
Hi Atropo, On Tuesday 17 August 2010 15:37:51 Atropo wrote: Hi all, i have this simple script to check if a file has arrive since the last hour find2perl tmp -type f -eval '-M $_ 1/24' -print |perl but now i would like to check in a remote server, maybe on ftp session. i have this

Newbie: Perl how evaluate files newer than an hour within ftp

2010-08-17 Thread Atropo
Hi all, i have this simple script to check if a file has arrive since the last hour find2perl tmp -type f -eval '-M $_ 1/24' -print |perl but now i would like to check in a remote server, maybe on ftp session. i have this ftp.pl perl -w ftp.log -MNet::FTP -le' ($second, $minute, $hour,

Re: Real newbie question

2010-07-22 Thread C.DeRykus
On Jul 21, 12:05 pm, jimsgib...@gmail.com (Jim Gibson) wrote: On 7/21/10 Wed  Jul 21, 2010  11:51 AM, Vaughan Williams vaughan...@gmail.com scribbled: ... bobs 10.10.10.45 jims 10.10.10.34 jacks 10.10.10.27 . . perl -ane 'print join( ,reverse(@F)),\n' file A variant using

Re: Real newbie question

2010-07-22 Thread Dr.Ruud
Jim Gibson wrote: vaughan...@gmail.com scribbled: I have a multi line text file laid out as below. 10.10.10.45 bobs 10.10.10.34 jims 10.10.10.27 jacks I would like to that the 10.10.10.??? and move it to the end of the same line so the output will look like. bobs 10.10.10.45 jims

Re: Real newbie question

2010-07-22 Thread C.DeRykus
On Jul 21, 3:42 pm, u...@stemsystems.com (Uri Guttman) wrote: JG == Jim Gibson jimsgib...@gmail.com writes:   JG On 7/21/10 Wed  Jul 21, 2010  11:51 AM, Vaughan Williams   JG vaughan...@gmail.com scribbled:   Hi all,     I'm hope you all could help me with a very simple question.    

Re: Real newbie question

2010-07-22 Thread Uri Guttman
CD == C DeRykus dery...@gmail.com writes: CD On Jul 21, 3:42 pm, u...@stemsystems.com (Uri Guttman) wrote:         perl -pe 's/(\S+)\s+(\S+)/$2 $1/' file CD Since the weather's good for golf... i was vaguely hinting at golf but i wanted a fairly normal looking solution as well!

Re: Real newbie question

2010-07-22 Thread Scott Hall
On Thu, Jul 22, 2010 at 2:34 AM, Dr.Ruud rvtol+use...@isolution.nlrvtol%2buse...@isolution.nl wrote: Jim Gibson wrote: vaughan...@gmail.com scribbled: I have a multi line text file laid out as below. 10.10.10.45 bobs 10.10.10.34 jims 10.10.10.27 jacks I would like to that the

Real newbie question

2010-07-21 Thread Vaughan Williams
Hi all, I'm hope you all could help me with a very simple question. I have a multi line text file laid out as below. 10.10.10.45 bobs 10.10.10.34 jims 10.10.10.27 jacks . . I would like to that the 10.10.10.??? and move it to the end of the same line so the output will look like. bobs

Re: Real newbie question

2010-07-21 Thread Jim Gibson
On 7/21/10 Wed Jul 21, 2010 11:51 AM, Vaughan Williams vaughan...@gmail.com scribbled: Hi all, I'm hope you all could help me with a very simple question. I have a multi line text file laid out as below. 10.10.10.45 bobs 10.10.10.34 jims 10.10.10.27 jacks . . I would

Re: Real newbie question

2010-07-21 Thread Uri Guttman
order. split or a regex will get the parts for you. either is easy enough to code up even for a newbie but split would be simpler i think. then combining those 2 parts back into a line is very easy and can be done with a simple string. the final step is just printing out the lines. you can print

Re: Real newbie question

2010-07-21 Thread Vaughan Williams
. the next step is to flip the fields. this can be done many different ways. you first need to get the 2 parts and then recombine them in the other order. split or a regex will get the parts for you. either is easy enough to code up even for a newbie but split would be simpler i think. then combining

Re: Real newbie question

2010-07-21 Thread Matt
I guess have allot of learning to do, can anyone suggest a good starting point books or online courses for true newbies. Learning Perl, Fifth Edition http://oreilly.com/catalog/9780596520113/ Best beginning Perl book. Perl Cookbook is great for examples as well. Perl 1: Introduction to Perl

Re: Real newbie question

2010-07-21 Thread Shlomi Fish
On Wednesday 21 Jul 2010 22:16:38 Vaughan Williams wrote: Hi Uri, Jim, Thanks for the help, it is a very small file some 8kB in size. Jim's supplied command worked perfectly, although I really do not understand it being a 1 day old perl want-a-be LOL I guess have allot of learning to

Re: Real newbie question

2010-07-21 Thread Uri Guttman
M == Matt lm7...@gmail.com writes: M Perl 1: Introduction to Perl M http://www.oreillyschool.com/courses/perl1/ M Online Course, Pricy but very good. i will second that as i know the author very well. level 2 will be out pretty soon. there will be 4 levels at least. these are not kiddie

Re: Real newbie question

2010-07-21 Thread Uri Guttman
JG == Jim Gibson jimsgib...@gmail.com writes: JG On 7/21/10 Wed Jul 21, 2010 11:51 AM, Vaughan Williams JG vaughan...@gmail.com scribbled: Hi all, I'm hope you all could help me with a very simple question. I have a multi line text file laid out as below.

NEWBIE: How to write to a file

2010-06-17 Thread Atropo
Hi all,don't know almost nothing about perl but I'm RTFM. Dimitre Radoulov gave a perl script to get and delete via ftp some files. now i want generate a log file with those file names. I only added the lines starting in uppercase perl -MNet::FTP -le' ( $host, $user, $pass, $dir ) =

Re: NEWBIE: How to write to a file

2010-06-17 Thread Uri Guttman
A == Atropo lxvasq...@gmail.com writes: A Hi all,don't know almost nothing about perl but I'm RTFM. A Dimitre Radoulov gave a perl script to get and delete via ftp some A files. now i want generate a log file with those file names. A I only added the lines starting in uppercase

Re: Newbie stuck at the first hurdle

2010-04-24 Thread Kryten
Hi Uri, Thanks for the response. I was using both Komodo Edit and Primalscript and didn't see a compile error, until I added the ref to $! then I could see that my filepath was being damaged because of the doublequotes. The reason I wondered about the full path was because I have been using

Re: Newbie stuck at the first hurdle

2010-04-24 Thread Kryten
Thank you Thomas. The problem was indeed the use of a double quoted string which was wrecking my file path. Using the $! var helped me to see that. Learning Perl and Programming Perl both arrived today, thank goodness! Cheers, Stuart -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Newbie stuck at the first hurdle

2010-04-22 Thread Kryten
Hi, This is embarrassing. All I want to do is read the content of a simple 10 line .txt file into an array and print out the lines, and I just can't seem to get it to work! /* $target = D:\testfile.txt; open NEWBIE, $target; @arr = WAWA; foreach $line (@arr) { print $line\n; } close(NEWBIE

Re: Newbie stuck at the first hurdle

2010-04-22 Thread Uri Guttman
K == Kryten kryte...@googlemail.com writes: K All I want to do is read the content of a simple 10 line .txt file K into an array and print out the lines, and I just can't seem to get K it to work! K /* K $target = D:\testfile.txt; K open NEWBIE, $target; that won't even compile

AW: Newbie stuck at the first hurdle

2010-04-22 Thread Thomas Bätzler
Kryten kryte...@googlemail.com asked: This is embarrassing. All I want to do is read the content of a simple 10 line .txt file into an array and print out the lines, and I just can't seem to get it to work! /* $target = D:\testfile.txt; open NEWBIE, $target; @arr = WAWA; foreach $line

Re: Newbie stuck at the first hurdle

2010-04-22 Thread Owen
Hi, This is embarrassing. All I want to do is read the content of a simple 10 line .txt file into an array and print out the lines, and I just can't seem to get it to work! /* $target = D:\testfile.txt; open NEWBIE, $target; @arr = WAWA; foreach $line (@arr) { print $line\n

Queries - Newbie

2010-01-13 Thread dolphin
Hi, I want to use perl and print time before and after sleep but not successful, can anyone advice? #!/usr/bin/perl my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime time; my $timenow=$hour$min$sec; print It is now $timenow\n; sleep 15; my $timelater=$hour$min$sec; print It is

Re: Queries - Newbie

2010-01-13 Thread John W. Krahn
dolphin wrote: Hi, Hello, I want to use perl and print time before and after sleep but not successful, can anyone advice? #!/usr/bin/perl my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime time; my $timenow=$hour$min$sec; print It is now $timenow\n; sleep 15; my

Re: Queries - Newbie

2010-01-13 Thread Uri Guttman
d == dolphin yc282...@yahoo.com.sg writes: d Hi, d I want to use perl and print time before and after sleep but not d successful, can anyone advice? d my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime d time; those variables contain the breakdown of time at the

Re: newbie question : about the perl sprintf

2009-10-25 Thread Majian
I found these : perl -e'print 01.234 + 01.234', \n' perl -e'print 01.234 + 011.234' \n' perl -e'print 01.234.12 + 01.234', \n' And the results were : 1235234 1235234 1235.12234 Can someone explain it ? Thanks~~ On Sat, Oct 24, 2009 at 7:28 PM, Peter Scott pe...@psdt.com wrote: On Wed, 21

Re: newbie question : about the perl sprintf

2009-10-25 Thread Philip Potter
2009/10/25 Majian jian...@gmail.com: I found these : perl -e'print 01.234 + 01.234', \n' print (01).(234+01).234, \n; this evaluates to '1'.'235'.'234' perl -e'print 01.234 + 011.234' \n' I didn't get 1235234, I got 1243234. print (01).(234+011).(234),\n evaluates to print

Re: newbie question : about the perl sprintf

2009-10-25 Thread Dr.Ruud
Majian wrote: I found these : perl -e'print 01.234 + 01.234', \n' perl -e'print 01.234 + 011.234' \n' perl -e'print 01.234.12 + 01.234', \n' And the results were : 1235234 1235234 1235.12234 For other surprises, try also: perl -wle 'print length(01.234.12)' perl -wle 'print 01.234.12' perl

Re: newbie question : about the perl sprintf

2009-10-24 Thread Peter Scott
On Wed, 21 Oct 2009 20:52:05 +0800, Majian wrote: And I modify it like this sprintf The number in scientific notation is %e, 01.255; The screen now output is The number in scientific notation is 1.255000e+03 Ha, this is an

  1   2   3   4   5   6   7   8   9   10   >