Re: localtime output result

2012-04-02 Thread Owen
> Hi, > > I am so confused the time output result. > > Time::tm=ARRAY(0x109c3b0) > > > Here is the code: > > #!/usr/bin/env perl > > use strict; > use warnings; > use autodie qw(open close); > use 5.012; > use Time::localtime; > use File::stat; > > open my $fh, '<', "too0.tex"; > > my $time = loca

localtime output result

2012-04-02 Thread lina
Hi, I am so confused the time output result. Time::tm=ARRAY(0x109c3b0) Here is the code: #!/usr/bin/env perl use strict; use warnings; use autodie qw(open close); use 5.012; use Time::localtime; use File::stat; open my $fh, '<', "too0.tex"; my $time = localtime; my $modtime = ctime(stat($f

Re: Perl for android

2012-04-02 Thread Bob goolsby
http://szabgab.com/perl-on-android.html Hope this Helps B On Mon, Apr 2, 2012 at 6:50 PM, Chris Stinemetz wrote: > This maybe a silly question but is it possible to install Perl compiler on > a android device? Just curious. > > Thanks, > > Chris -- Bob Goolsby bob.gool...@gmail.com -- T

Perl for android

2012-04-02 Thread Chris Stinemetz
This maybe a silly question but is it possible to install Perl compiler on a android device? Just curious. Thanks, Chris

Re: send email by /usr/bin/mail

2012-04-02 Thread Shlomi Fish
Hi lina, On Mon, 2 Apr 2012 21:17:09 +0800 lina wrote: > Hi, > > I don't know how to send email in perl with > /usr/bin/mail > > Thanks ahead for any suggestions You shouldn't use /usr/bin/mail to send E-mail in Perl, as there are better (= more portable/etc.) solutions on CPAN. See: https:/

Re: send email by /usr/bin/mail

2012-04-02 Thread Dr.Ruud
On 2012-04-02 16:13, Samir Arishy wrote: eval { $sender->send($email) }; die "Error sending email: $@" if $@; Don't test $@, it is a global. Make use of the return value of the eval: eval { $sender->send( $email ); 1; # success } or do { # failure my $ev

Re: how to check new file generated

2012-04-02 Thread lina
On Mon, Apr 2, 2012 at 11:35 PM, Jim Gibson wrote: > At 4:08 PM +0800 4/2/12, lina wrote: >> >> I wish there is an alternative way in linux without installing use >> Mail::Sendmail; >> >> on bash I used >> >> mail lina.lastn...@gmail.com < report.txt > > > If that works for you on your system, the

Re: how to check new file generated

2012-04-02 Thread Jim Gibson
At 4:08 PM +0800 4/2/12, lina wrote: I wish there is an alternative way in linux without installing use Mail::Sendmail; on bash I used mail lina.lastn...@gmail.com < report.txt If that works for you on your system, then just execute the same thing using system: system('mail lina.lastn...@

Re: send email by /usr/bin/mail

2012-04-02 Thread Shekar
Here is the example i used to send emails from Perl scripts, might be useful for you...!!! sub sendEmail { my ($file)=@_; use Mail::Sender; my $sender = new Mail::Sender { smtp => '127.0.0.1', from => 'ad...@domain.com' } or die "unable to create the obj $!, $@.\n

Re: send email by /usr/bin/mail

2012-04-02 Thread Samir Arishy
This one worked for me...I am using gmail!!! ... use Email::Send; use Email::Send::Gmail; use Email::Simple::Creator; my $email = Email::Simple->create( header => [ >From =>' x...@gmail.com', To => 'y...@gmail.com', Subject => 'msg from Perl', ], body => 'send from Perl script.', ); my $sender =

Re: send email by /usr/bin/mail

2012-04-02 Thread lina
On Mon, Apr 2, 2012 at 9:34 PM, Shawn H Corey wrote: > On 12-04-02 09:17 AM, lina wrote: >> >> Thanks ahead for any suggestions > > > Have you tried searching CPAN for "mail"? http://search.cpan.org/ This short script is planned to use in remote server to check whether has new file with "step*" n

Re: send email by /usr/bin/mail

2012-04-02 Thread Shawn H Corey
On 12-04-02 09:17 AM, lina wrote: Thanks ahead for any suggestions Have you tried searching CPAN for "mail"? http://search.cpan.org/ -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. [updated for today's pr

send email by /usr/bin/mail

2012-04-02 Thread lina
Hi, I don't know how to send email in perl with /usr/bin/mail Thanks ahead for any suggestions Best regards, -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: how to check new file generated

2012-04-02 Thread lina
I wish there is an alternative way in linux without installing use Mail::Sendmail; on bash I used mail lina.lastn...@gmail.com < report.txt Thanks, On Mon, Apr 2, 2012 at 4:07 PM, lina wrote: > Thanks now better. Just the send email still not work. With > Mail::Sendmail installed. > > sendma

Re: how to check new file generated

2012-04-02 Thread lina
Thanks now better. Just the send email still not work. With Mail::Sendmail installed. sendmail( From=> 'lina.lastn...@gmail.com', To => 'lina.lastn...@gmail.com', Subject => 'Step coming close', Message => "Dangerous", ); Do I need set up something extra? > > > > John > -

Re: how to check new file generated

2012-04-02 Thread John W. Krahn
lina wrote: Hi, Hello, At some directory, I wish to check are there some new file generated with step* if no new generated, I wish it sleep for a while if there are some new files generated, I wish it to send am email to myself. Here is what I have came up so far, #!/usr/bin/env perl

Re: Sending files efficiently with Net::SMTP

2012-04-02 Thread Jenda Krynicky
From: mailing lists > I have a perl (Ver. 5.10.0) program running over an old machine which send > messages with this code: > > >     my $smtp = Net::SMTP->new($dstMailServer, Timeout=>10, Debug=>0,); >     unless(defined($smtp)){ >     syslog LOG_INFO, "id:%s error: unable

how to check new file generated

2012-04-02 Thread lina
Hi, At some directory, I wish to check are there some new file generated with step* if no new generated, I wish it sleep for a while if there are some new files generated, I wish it to send am email to myself. Here is what I have came up so far, #!/usr/bin/env perl use strict; use warnings;