|
|
Up |
|
|
  |
|
|
  |
Author: Elavazhagan PerlElavazhagan Perl
Date: Jul 7, 2008 08:42
Hi,
Please have a glance on the following code and suggest me to purify it.....
My requirement is when the user choose the region,I need to display the
countries specific to that regions.
I have been trying in both hash and array references.This one is for
arrayref.
I have already the values of $RegionStmt in an individual array...
I hope that we can use the following statement to retrive the first value of
the first array ref. $countryValues= $Regions[0][0];
I would like to retrive all the values instead of single one.....Please
suggest me.
Thanks .
#Start
#! /usr/local/perl/bin
use strict;
my @Regions = (
["Belgium","Denmark","France","Germany","GreatBritain","Hungary","Portugal","Russia","Spain","Sweden","Turkey"
],
|
| Show full article (1.36Kb) |
|
| |
5 Comments |
|
  |
Author: LoodyLoody
Date: Jul 7, 2008 08:29
Dear all:
below is what I excerpt form "perl cook book".
What does <<"EOF" mean at the end of print?
thanks for your help,
miloody
open(SENDMAIL, "|/usr/sbin/sendmail -oi -t -odq")
or die "Can't fork for sendmail: $!\n";
print SENDMAIL <<"EOF";
From: Tom Christiansen perl.com>
To: Nathan Torkington frii.com>
Subject: Re: The Perl Cookbook
(1) We will never finish the book.
(2) No man who uses EMACS is deserving of love.
(3) I recommend coq au vi.
tom
EOF
close(SENDMAIL);
|
| |
|
3 Comments |
|
  |
Author: DermotDermot
Date: Jul 7, 2008 07:19
HI All,
Is anyone familiar with the workings of Config::General?
I am struggling to get my configuration values out of a file.
My config file looks like this:
name myApp
dbi:SQLite __HOME__/database.db
When I use Data::Dumper to dump the whole config I see this
|
| Show full article (2.14Kb) |
|
3 Comments |
|
  |
Author: T BaetzlerT Baetzler
Date: Jul 7, 2008 05:32
Rajnikant persistent.co.in> wrote:
> Thanks Thomas.
>
> I tried same with File::Type :).
I considered that module, too, but it's got some problems:
http://cpanratings.perl.org/dist/File-Type
While I don't mind the memory footprint, I would rather have
a module that uses a magic file that can easily be updated.
HTH,
Thomas
|
| |
|
no comments
|
|
  |
Author: T BaetzlerT Baetzler
Date: Jul 7, 2008 03:55
Rajnikant persistent.co.in> asked:
> Unix command file gives file type of that file.
> # file a.txt.gz
> a.txt.gz: gzip compressed data, was "a.txt", from Unix
>
> How can I achieve same in perl?
|
| |
|
1 Comment |
|
  |
|
|
  |
Author: RajnikantRajnikant
Date: Jul 7, 2008 02:24
Hello everyone,
Unix command file gives file type of that file.
# file a.txt.gz
a.txt.gz: gzip compressed data, was "a.txt", from Unix
How can I achieve same in perl?
Thanks,
Rajnikant
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
|
| |
|
no comments
|
|
|
|
|