RE: [ Hash of Arrays]

2004-05-04 Thread suresh.pasupula
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

RE: [ Hash of Arrays]

2004-05-04 Thread Tim Johnson
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

RE: [ Hash of Arrays]

2004-05-04 Thread Tim Johnson
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

RE: [ Hash of Arrays]

2004-05-04 Thread Tim Johnson
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];

RE: [ Hash of Arrays]

2004-05-04 Thread suresh.pasupula
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

[ Hash of Arrays]

2004-05-04 Thread suresh.pasupula
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"

Re: Web based admin using PERL and CGI

2004-05-04 Thread Wiggins d'Anconia
[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

Re: Perl Build

2004-05-04 Thread Wiggins d'Anconia
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

Re: Read From Socket

2004-05-04 Thread Wiggins d'Anconia
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

Re: simple include

2004-05-04 Thread Wiggins d'Anconia
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

Re: simple include

2004-05-04 Thread J Adam Latham
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

Re: How do i call a module !

2004-05-04 Thread JupiterHost.Net
[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 =

How do i call a module !

2004-05-04 Thread amjoe11-3
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

Re: Removing characters from a string

2004-05-04 Thread Jimstone77
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

Ntsendmail

2004-05-04 Thread PerlDiscuss - Perl Newsgroups and mailing lists
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

Re: Removing characters from a string

2004-05-04 Thread John W. Krahn
[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

Re: Using variables in a regex

2004-05-04 Thread John W. Krahn
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 =~ >

Re: Removing characters from a string

2004-05-04 Thread James Edward Gray II
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

Re: Removing characters from a string

2004-05-04 Thread Andrew Gaffney
[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

Removing characters from a string

2004-05-04 Thread Jimstone77
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."

Re: Using variables in a regex

2004-05-04 Thread KEVIN ZEMBOWER
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

simple include

2004-05-04 Thread Andrew Gaffney
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');

Re: SIMPLE SEARCH AND REPLACE

2004-05-04 Thread James Edward Gray II
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 <*

Re: SIMPLE SEARCH AND REPLACE

2004-05-04 Thread Madhu Reddy
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

AHHH M$Sql DBD unixODBC freetds

2004-05-04 Thread Paul D. Kraus
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::

Re: SIMPLE SEARCH AND REPLACE

2004-05-04 Thread James Edward Gray II
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

SIMPLE SEARCH AND REPLACE

2004-05-04 Thread Madhu Reddy
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

regex problem

2004-05-04 Thread Graeme McLaren
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-

Re: Question about CPAN modules

2004-05-04 Thread Wiggins d Anconia
> > 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

Read From Socket

2004-05-04 Thread Roman Baeriswyl
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

Perl Build

2004-05-04 Thread Karl
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

RE: Perl on Apache

2004-05-04 Thread B. Fongo
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

RE: Perl on Apache

2004-05-04 Thread B. Fongo
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

RE: Question about CPAN modules

2004-05-04 Thread Babale Fongo
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

Re: OT question about Texinfo

2004-05-04 Thread David Dorward
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

OT question about Texinfo

2004-05-04 Thread Gabor Urban
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

Re: Perl on Apache

2004-05-04 Thread Sumanth Sharma
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

RE: Perl on Apache

2004-05-04 Thread Traeder, Philipp
> 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

Perl on Apache

2004-05-04 Thread Sumanth Sharma
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.

re: Extracting number from string

2004-05-04 Thread Jose Alves de Castro
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.

RE: Question about CPAN modules

2004-05-04 Thread NYIMI Jose (BMB)
> -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

Question about CPAN modules

2004-05-04 Thread Babale Fongo
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