No, I want to use Hash of Arrays.
I want to define the hash in a better manner say something similar to
the following way.
my %ModelPath = {
"2800" => [EMAIL PROTECTED],
"4345" => [EMAIL PROTECTED]
};
But by doing so I am n
Oops! That last line should be:
my @tempArray = @{$_};
-Original Message-
From: Tim Johnson
Sent: Tuesday, May 04, 2004 10:36 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [ Hash of Arrays]
I think you might actually want an array of arrays (list of lists,
etc.). The
I think you might actually want an array of arrays (list of lists,
etc.). Then you can just do something like this:
push @BigArray,[EMAIL PROTECTED];
And then when you're done, you can do something like this:
foreach(@BigArray){
my $temp = $_->[0];
my @tempArray = @{$temp};
}
-Ori
First I'll show you ONE of the right ways:
use strict;
use warnings;
#declare the arrays
my @one = ("abc", "def");
my @two = ("ABC", "DEF");
#initialize the hash (note the parens)
my %ModelPath = ();
#add the arrays to the hash
$ModelPath{1} = [EMAIL PROTECTED];
Hi Shawn,
Thanks for the quick response.
It works fine.
$temp = $ModelPath{"1"};
@Array = @$temp; # here I get the copy of "@one" into "@Array". But
# can I directly get the copy of "@one" instead
of having
# it in two steps.
Also is there
Hi,
I would like to initialize a hash of arrays and retrieve the contents of
hash.
For eg. I have two arrays.
my @one = ("abc", "def");
my @two = ("ABC", "DEF");
Now I will initialize a hash in the following way.
my %ModelPath = {};
$ModelPath{"1"} = [EMAIL PROTECTED];
$ModelPath{"2"
[EMAIL PROTECTED] wrote:
Hey all, I am thinking I'd like to "browserize" a number of simple functions, please correct
me if I understand what I'd need to do. Lets say I want to run a pkginfo command on my web server,
and return teh results to a browser, I'd need to call a ksh script from a CGI m
Karl wrote:
Hi again,
I would like to build an unthreaded versions of Perl v5.8.1 for Mandrake 9.2
using a src.rpm and install as /usr/local/bin/perl.
I would imaging I need to remove the USE_ITHREADS compile time option. Since
I'm new at doing this I don't know where to start.
That sounds abou
Roman Baeriswyl wrote:
Hey Guys
I'm trying to read an answer from an SMTP server via socket.
I'm writing a function wich returns everything till it finds a line which
doesn't begin with 3 digits and a - (/^[\d]{3}-/), but returns this
line,too.
Best I could get till now, is the function below. My q
Please bottom post
J Adam Latham wrote:
Try removing "my" from all the variables in your module ... You're privatizing
them to your module thereby excluding them from your external program ...
At least that's my guess! :^)
Hopefully you could at least suggest to 'our' them instead of 'my', s
Try removing "my" from all the variables in your module ... You're privatizing
them to your module thereby excluding them from your external program ...
At least that's my guess! :^)
HTH,
Adam
On Tuesday 04 May 2004 12:12 pm, Andrew Gaffney wrote:
: I'm working on a small Perl-based webapp. I
[EMAIL PROTECTED] wrote:
Hi there !
Hello Joe,
I'm very new to perl and i'm asked to call a particular perl module using a function
! how do i go about ???
Should use MODULES::Filename ..?
use is the right thing, but the args depend on the the module:
For instance, you can do:
use CGI;
my $cgi =
Hi there !
I'm very new to perl and i'm asked to call a particular perl module using a function
! how do i go about ???
Should use MODULES::Filename ..?
The problem is i'm not sure what are the values to be passed on to that ! This
module basically parses the html file and pushes all the links
In a message dated 5/4/04 5:19:49 PM Eastern Daylight Time, Jimstone77
writes:
> In a message dated 5/4/04 4:14:58 PM Eastern Daylight Time,
> [EMAIL PROTECTED] writes:
>
>
> >> :
>>
>> >
>> > How would I remove any and "only" single characters from a string?
>> >
>> > $_ = "This is a charac
Hi,
I'm new to this and I'd like to know if anybody knows NTsendmail and how I
can add variable that
point to a textarea defined in a HTML file? I can run it now but it shows
the
example text defined in my pl script file. I'd like to replace that message
with the content of a textarea of a HTML fi
[EMAIL PROTECTED] wrote:
>
> How would I remove any and "only" single characters from a string?
>
> $_ = "This is a character d g string test";
>
> I want this to read "This is character string test."
s/(?:\s+[b-hj-z]\b|\b[b-hj-z]\s+)//ig;
John
--
use Perl;
program
fulfillment
--
To unsub
Kevin Zembower wrote:
>
> I'm still having trouble with the regex expression. I've pasted in
> the files and program at the end, for reference.
>
> In your message, you said:
> my %hash = ( abstract => '', author => '', endtitle => '' );
> $hash{ lc $2 } = $3
> while $query =~
>
On May 4, 2004, at 3:05 PM, [EMAIL PROTECTED] wrote:
How would I remove any and "only" single characters from a string?
$_ = "This is a character d g string test";
I want this to read "This is character string test."
How about:
s/\b[a-zA-Z]\b//g;
Hope that helps.
James
--
To unsubscribe, e-mail: [E
[EMAIL PROTECTED] wrote:
How would I remove any and "only" single characters from a string?
$_ = "This is a character d g string test";
I want this to read "This is character string test."
Off the top of my head...untested:
$string =~ s/ \w\b//g;
--
Andrew Gaffney
Network Administrator
Skyline Ae
How would I remove any and "only" single characters from a string?
$_ = "This is a character d g string test";
I want this to read "This is character string test."
John, thank you so much for your generous gift of going throughout my program and
making suggestions. As I typed in your suggestions, I tried to make sense of what you
were proposing, and most of the time I clearly understood it.
I'm still having trouble with the regex expression. I've pasted in
I'm working on a small Perl-based webapp. I want to create a small include file that all
scripts will use. It looks like:
use CGI;
use DBI();
my $cgi = new CGI;
my $dbh = DBI->connect("DBI:mysql:database=somedb;host=127.0.0.1", "user", "pass");
my $p = $cgi->Vars;
my $uid = $cgi->cookie('uid');
On May 4, 2004, at 1:40 PM, Madhu Reddy wrote:
Gary,
Close, but not quite. Glance at that name again. ;)
Thanks for your response..
those variables are only one for file..
say file1 have only
and file 2 have only
like this i have 100 files...
i want a common search and replace
to replace <*
Gary,
Thanks for your response..
those variables are only one for file..
say file1 have only
and file 2 have only
like this i have 100 files...
i want a common search and replace
to replace <*_IFILE> with new value..
i have common one like in all the
files,
for this i am doing following
Is there some secert handshake to get dbi to work with a microsoft sql 2000
server?
I have followed the cryptic path and dug my way into installing unixODBC and
freetds and I am able to connect to the servers with the isql command and the
datamanager.
But when i try and install the perl DBD::
On May 4, 2004, at 10:54 AM, Madhu Reddy wrote:
Hi,
in a file, I have following variables,
I want to replace those variables with
values
basically i want to replace all <*_IFILE> with some
value say file.txt
How to do this in perl ?
If memory isn't an issue, the easy way is to load a has
Hi,
in a file, I have following variables,
I want to replace those variables with
values
basically i want to replace all <*_IFILE> with some
value say file.txt
How to do this in perl ?
Thanks
__
Do you Yahoo!?
Win a $2
Hey all, I need to do a regular expression to match the URL with a return
status from an error log which looks like this:
title: test 7
size = 78
pick: 10.2.203.1, # servers = 1
8:8:1:http://10.2.203.1/test8.html: Retrieval command for
http://10.2.203.1/test8.html: GET /test8.html HTTP/1.0
User-
>
> My program depends on some CPAN modules (e.g. Image::Magick,
> MD5::Digest) to operate, so I want to distribute it with those modules.
> How do I best redistribute module? Is it possible to pre-install
> modules (copy) in my program folder for distributed?
>
The two modules (or at least on
Hey Guys
I'm trying to read an answer from an SMTP server via socket.
I'm writing a function wich returns everything till it finds a line which
doesn't begin with 3 digits and a - (/^[\d]{3}-/), but returns this
line,too.
Best I could get till now, is the function below. My question now is, if
tha
Hi again,
I would like to build an unthreaded versions of Perl v5.8.1 for Mandrake 9.2
using a src.rpm and install as /usr/local/bin/perl.
I would imaging I need to remove the USE_ITHREADS compile time option. Since
I'm new at doing this I don't know where to start.
I could use as much advice
It is probably because you didn't instruct the browser well.
Add this at the top of your script:
print "Content-type: text/html\n\n";
or if you're using CGI.pm this:
print header (-type => 'text/html');
||> -Original Message-
||> From: Sumanth Sharma [mail
It is probably because you didn't instruct the browser well.
Add this at the top of your script:
print "Content-type: text/html\n\n";
or if you're using CGI.pm this:
print header (-type => 'text/html');
||> -Original Message-
||> From: Sumanth Sharma [mail
The program will most likely be hosted by an ISP. As most ISPs only
have standard Perl modules installed on their machines. The modules my
program need are not default modules, so I want to distribute my program
together with those modules.
||> -Original Message-
||> From: NYIMI Jose
On 4 May 2004, at 13:41, Gabor Urban wrote:
I know that my question is offtopic here, but can anybody inform me,
if there is a tool to convert Texinfo documentation to HTML?
Looking at the Texinfo homepage I see:
texi2html, an (actively maintained) alternative translator
for generating HTML, ro
Hi,
I know that my question is offtopic here, but can anybody inform me,
if there is a tool to convert Texinfo documentation to HTML?
Gabaux
Linux is like a wigwam: no gates, no windows, and an apache
inside!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL P
Hi Philipp,
Thanks a lot. It works.
As you could make out, I am nascent to Apache. So It was really useful.
Be prepared for more of this kind.
Regards,
Sumanth
===
"Philipp Traeder" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > N
> Now, I placed a file called host.pl, in the cgi-bin folder
>
> but when I invoke http://127.0.0.1/cgi-bin/host.pl
> My browser tries to download this file.
>
> But I expected Apache/ or Perl to have executed this script.
Maybe you're missing some entries in your apache configuration:
You need
Hi All,
Pls Bare with me If I am scratching some rudimental stuff here
I know perl lang Fundas. But...
--
[Some Historical background for my problem
{History: I want a project management system, so I plan to use Twiki.
If I was taking all the digits out (result would be 123400), I would do:
y/0-9//cd;
This takes all the characters not in [0-9] and deletes them.
On Mon, 2004-05-03 at 19:58, William Black wrote:
> Hello All,
>
> I need a regular expression to extract only the number from the below
> string.
> -Original Message-
> From: Babale Fongo [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 03, 2004 10:54 PM
> To: [EMAIL PROTECTED]
> Subject: Question about CPAN modules
>
>
> My program depends on some CPAN modules (e.g. Image::Magick,
> MD5::Digest) to operate, so I want to distribute i
My program depends on some CPAN modules (e.g. Image::Magick,
MD5::Digest) to operate, so I want to distribute it with those modules.
How do I best redistribute module? Is it possible to pre-install
modules (copy) in my program folder for distributed?
Regard
Babs
42 matches
Mail list logo