comp.lang.perl.misc
  Home FAQ Contact Sign in
Your Ad Here
comp.lang.perl.misc only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.perl.misc Profile…
RELATED GROUPS

POPULAR GROUPS

more...


 Up
  How to display 1.234.567.890,00 from 1234567890 ?         


Author: Jason Stacy
Date: May 4, 2008 23:33

Given a decimal value (e.g. 1234567890) I want to print this number with
grouping delimiters (european style with dots: 1.234.567.890,00
and not US style 1,234,567,890.00)

How can I do this in perl?

Jason
2 Comments
  EARN US DOLLARS, WITHOUT INVESTMENT, HOME BUSINESS, 100%% LEGAL         


Author: ROSA
Date: May 4, 2008 20:16

Interested in Building Online Business Empire Without Investing
Single
Dollar!!

Explore The Best Online Income Opportunity On The Internet Today -
Absolutely FREE!

EARN UNLIMETED WITHOUT INVESTMENT WITH On The Net..

"on top of the primary purchase and MAKE MORE MONEY WITHOUT DOING ANY
ADDITIONAL WORK!"

For More Details; http://moneybusinessideas.blogspot.com/
no comments
  Problem with email attachment, 1 becomes 10         


Author: M.O.B. i L.
Date: May 4, 2008 18:07

I'm trying to write a program that can send out mails to companies where
I'm interested in working. These mails are the same except that the
company name is switched. My CV should be attached as a pdf-file.
The problem is that I don't get one attachment, but ten! Also the
message is repeated 10 times. If I change the program by uncommenting
the commented line in the function load() it works but then it doesn't
send the correct pdf-file. The CV is 129490 bytes. How could I change
this program so that there is only one attachment and no repeated messages?

In the program below some long lines might have been splitted.

#!/usr/bin/perl

# jobapplier.pl vN/A (Buggy!)
# Author: Mikael O. Bonnier, mikaelb@df.lth.se,
http://www.df.lth.se/~mikaelb/
# Copyright (C) 2008 by Mikael O. Bonnier, Lund, Sweden.
# License: GNU GPL v3 or later, http://www.gnu.org/licenses/gpl-3.0.txt
Show full article (3.77Kb)
3 Comments
  FAQ 3.26 Where can I learn about object-oriented Perl programming?         


Author: PerlFAQ Server
Date: May 4, 2008 18:03

This is an excerpt from the latest version perlfaq3.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

3.26: Where can I learn about object-oriented Perl programming?

A good place to start is perltoot, and you can use perlobj, perlboot,
perltoot, perltooc, and perlbot for reference.

A good book on OO on Perl is the "Object-Oriented Perl" by Damian Conway
from Manning Publications, or "Intermediate Perl" by Randal Schwartz,
brian d foy, and Tom Phoenix from O'Reilly Media.

--------------------------------------------------------------------
Show full article (1.37Kb)
no comments
  FAQ 4.18 Does Perl have a Year 2000 problem? Is Perl Y2K compliant?         


Author: PerlFAQ Server
Date: May 4, 2008 12:03

This is an excerpt from the latest version perlfaq4.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

4.18: Does Perl have a Year 2000 problem? Is Perl Y2K compliant?

Short answer: No, Perl does not have a Year 2000 problem. Yes, Perl is
Y2K compliant (whatever that means). The programmers you've hired to use
it, however, probably are not.

Long answer: The question belies a true understanding of the issue. Perl
is just as Y2K compliant as your pencil--no more, and no less. Can you
use your pencil to write a non-Y2K-compliant memo? Of course you can. Is
that the pencil's fault? Of course it isn't.
Show full article (2.56Kb)
no comments
  FAQ 4.17 How do I find yesterday's date?         


Author: PerlFAQ Server
Date: May 4, 2008 06:03

This is an excerpt from the latest version perlfaq4.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

4.17: How do I find yesterday's date?

(contributed by brian d foy)

Use one of the Date modules. The "DateTime" module makes it simple, and
give you the same time of day, only the day before.

use DateTime;

my $yesterday = DateTime->now->subtract( days => 1 );

print "Yesterday was $yesterday\n";

You can also use the "Date::Calc" module using its "Today_and_Now"
function.

use Date::Calc qw( Today_and_Now Add_Delta_DHMS );

my @date_time = Add_Delta_DHMS( Today_and_Now(), -1, 0, 0, 0 );

print "@date_time\n";
Show full article (1.88Kb)
4 Comments
  How to clear all previous terminal output which is currently visible?         


Author: Jason Stacy
Date: May 4, 2008 05:17

Assume I have opened a terminal and already performed some commands which produced some
output lines.

Then I start a perl script which outputs also some line of text.

However I want at first all previous output lines in the terminal to be wiped.
All output should start with an "empty" terminal (of cause beside the prompt).

How can I wipe all old stuff?

In Windows command prompt there is a "cls" command but is not working in
perl/Linux terminals.

Is there an equivalent command?

Jason
1 Comment
  How to print formatted (!) the current timestamp?         


Author: Thomas Blabb
Date: May 4, 2008 02:09

I want to print the current time(stamp) in formatted style.
The following does not work:

print STDOUT "Now=%%Y%%m%%d-%%H%%M\n", localtime(time);

What is wrong?

How else can I print out a formatted timestamp?

Tom
7 Comments
Your Ad Here
  FAQ 4.15 How can I take a string and turn it into epoch seconds?         


Author: PerlFAQ Server
Date: May 4, 2008 00:03

This is an excerpt from the latest version perlfaq4.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

4.15: How can I take a string and turn it into epoch seconds?

If it's a regular enough string that it always has the same format, you
can split it up and pass the parts to "timelocal" in the standard
"Time::Local" module. Otherwise, you should look into the "Date::Calc"
and "Date::Manip" modules from CPAN.

--------------------------------------------------------------------

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.
Show full article (1.30Kb)
no comments