RE: perl and DB connectivities

2002-09-24 Thread IT Workflow - Terry Honeyford
Title: RE: perl and DB connectivities you could try this little routine, After opening the connection and making the query:- while(($rc = $X->ct_results($restype)) == CS_SUCCEED) {     next if ($restype == CS_CMD_DONE || $restype == CS_CMD_FAIL || $restype == CS_CMD_SUCCEED);     @

perl 5.8.0 for AIX 4.3.3

2002-09-24 Thread Angerstein
Anyone here who has the binary files of perl 5.8 for AIX 4.3.3? Any idea where I can get the bins? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: client-server with socket

2002-09-24 Thread Mat Harris
sorry, i have not made myself clear and the many typos won't have helped either. I need both ends of the connection to be able to read and write data. I will outline the process here: 1) user runs client using config file containing username/passwd/domainname 2) client connects to server and awai

Re: perl 5.8.0 for AIX 4.3.3

2002-09-24 Thread Sudarshan Raghavan
On Tue, 24 Sep 2002, Angerstein wrote: > Anyone here who has the binary files of perl 5.8 for AIX 4.3.3? > > Any idea where I can get the bins? If you want to build from the source files (recommended approach) http://www.cpan.org/src/stable.tar.gz This is the link for binaries http://www.cpan

AW: perl 5.8.0 for AIX 4.3.3

2002-09-24 Thread Angerstein
No, there are no binaries of 5.8. Today, I not in mind to build it myself. Have to code a little. > -Ursprüngliche Nachricht- > Von: Sudarshan Raghavan [mailto:[EMAIL PROTECTED]] > Gesendet am: Donnerstag, 26. September 2002 07:50 > An: Perl beginners > Betreff: Re: perl 5.8.0 for AIX 4

Re: client-server with socket (fwd)

2002-09-24 Thread Sudarshan Raghavan
-- Forwarded message -- Date: Thu, 26 Sep 2002 11:34:46 +0530 (IST) From: Sudarshan Raghavan <[EMAIL PROTECTED]> To: Mat Harris <[EMAIL PROTECTED]> Subject: Re: client-server with socket On Tue, 24 Sep 2002, Mat Harris wrote: > sorry, i have not made myself clear and the many t

Regular Expression

2002-09-24 Thread Brian Ling
Hi Does anyone know how to save any data that is matched by regular expression, from within a string or array, the match could occur any number of times. I can happily discard any matched data, but not the other way round. Help this is driving me up the wall, I'm sure there is an easy answer to

RE: join hashes?

2002-09-24 Thread Meidling, Keith, CTR, OSD-C3I
I've been working with perl for a while now, and I still have not been able to grasp the concept of references. I've got Beginning Perl by Simon Cozens published by Wrox, I have the Camel, and the cookbook. After reading the information, and trying to ask people as well I still cannot understand w

Re: Regular Expression

2002-09-24 Thread Sudarshan Raghavan
On Tue, 24 Sep 2002, Brian Ling wrote: > Hi > > Does anyone know how to save any data that is matched > by regular expression, from within a string or array, > the match could occur any number of times. > > I can happily discard any matched data, but not the > other way round. > > Help this is

RE: join hashes?

2002-09-24 Thread Sudarshan Raghavan
-- Forwarded message -- Date: Thu, 26 Sep 2002 12:22:33 +0530 (IST) From: Sudarshan Raghavan <[EMAIL PROTECTED]> To: "Meidling, Keith, CTR, OSD-C3I" <[EMAIL PROTECTED]> Subject: RE: join hashes? On Tue, 24 Sep 2002, Meidling, Keith, CTR, OSD-C3I wrote: > I've been working with

Re: client-server with socket (fwd)

2002-09-24 Thread Mat Harris
i have read that but either it doesn't explain about 2-way sockets or i don't understand it. On Thu, Sep 26, 2002 at 11:38:53 +0530, Sudarshan Raghavan wrote: > > > -- Forwarded message -- > Date: Thu, 26 Sep 2002 11:34:46 +0530 (IST) > From: Sudarshan Raghavan <[EMAIL PROTECTED

regexp hides info?

2002-09-24 Thread David Samuelsson (PAC)
I have an array with a lot of data. i want to remove certain elements from it: so i ran: for (@array){ s/$current_user.*//; } nw when i print it, all $current user are gone as i wanted, but its a big space in the array instead. like: user1 user1 user2 use

Re: regexp hides info?

2002-09-24 Thread George P.
On Tue, 24 Sep 2002, David Samuelsson (PAC) wrote: > I have an array with a lot of data. > > i want to remove certain elements from it: > so i ran: >for (@array){ >s/$current_user.*//; >} > > nw when i print it, all $current user are gone as i wanted, but i

Re: regexp hides info?

2002-09-24 Thread Sudarshan Raghavan
On Tue, 24 Sep 2002, David Samuelsson (PAC) wrote: > I have an array with a lot of data. > > i want to remove certain elements from it: > so i ran: >for (@array){ >s/$current_user.*//; >} > > nw when i print it, all $current user are gone as i wanted, but its

Re: client-server with socket (fwd)

2002-09-24 Thread Sudarshan Raghavan
On Tue, 24 Sep 2002, Mat Harris wrote: > i have read that but either it doesn't explain about 2-way sockets or i > don't understand it. It does the socket call creates a communication endpoint (for both reading and writing). You can access this endpoint through the filehandle which is the firs

MySQL & Perl (again)

2002-09-24 Thread dan
Finally I managed to get my perl script to connect to the relevant MySQL database. I've looked at the DBI.pm information, but I still am pretty clueless about how you read data from a table, and write data to it. Any help much appreciated. Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: client-server with socket

2002-09-24 Thread zentara
On Tue, 24 Sep 2002 10:47:33 +0100, [EMAIL PROTECTED] (Mat Harris) wrote: >sorry, i have not made myself clear and the many typos won't have helped > >1) user runs client using config file containing username/passwd/domainname >2) client connects to server and awaits ready code >3) server sees cl

Re: client-server with socket

2002-09-24 Thread zentara
On Tue, 24 Sep 2002 08:44:30 -0400, [EMAIL PROTECTED] (Zentara) wrote: >On Tue, 24 Sep 2002 10:47:33 +0100, [EMAIL PROTECTED] (Mat >Harris) wrote: > >>anyone willing to write me some quick examples. > >Here is a "sockets-upload client-server" I wrote with Net::EasyTCP. I must add that Net::EasyT

Re: MySQL & Perl (again)

2002-09-24 Thread Ramprasad A Padmanabhan
How have you 'looked at the DBI.pm' do a perldoc DBI and you will learn faster Besides if you are using Mysql install Mysql.pm and using this is very easy Dan wrote: > Finally I managed to get my perl script to connect to the relevant MySQL > database. I've looked at the DBI.pm information, b

RE: MySQL & Perl (again)

2002-09-24 Thread wiggins
This is straight from the DBI docs: The typical method call sequence for a SELECT statement is: prepare, execute, fetch, fetch, ... execute, fetch, fetch, ... execute, fetch, fetch, ... for example: $sth = $dbh->prepare("SELECT foo, bar FROM table WHERE baz=?"); $sth->exe

RE: regexp hides info?

2002-09-24 Thread David Samuelsson (PAC)
@array = grep !/^\s*$/, @array; This will return an array of elements (removing all elements that are either filled with spaces or are blank) George. i read that it wasnt so good to use this in ther perlfaq: Please do not use ($is_there) = grep $_ eq $whatever, @array; or worse yet (

Re: MySQL & Perl (again)

2002-09-24 Thread Robert Rendler
On Tue, 24 Sep 2002 12:45:58 +0100 "dan" <[EMAIL PROTECTED]> wrote: > Finally I managed to get my perl script to connect to the relevant MySQL > database. I've looked at the DBI.pm information, but I still am pretty > clueless about how you read data from a table, and write data to it. Any > help

Array Handling

2002-09-24 Thread Rohit Mishra-R53658
Hi all, Is there any way to open a "handle" to an array as we open a handle to a file?? The condition being we can use that "array handle" everywhere we can use a file handle Like if we do: $fh = new FileHandle "file.txt", O_APPEND; print $fh "Written!\n"; it will add a line to the file f

Re: Array Handling

2002-09-24 Thread James Edward Gray II
I think you're looking for: push @array, $elements, $to, $add; On Tuesday, September 24, 2002, at 08:34 AM, Rohit Mishra-R53658 wrote: > Hi all, > > Is there any way to open a "handle" to an array as we open a handle to > a > file?? The condition being we can use that "array handle" everywhe

RE: regexp hides info?

2002-09-24 Thread Sudarshan Raghavan
On Tue, 24 Sep 2002, David Samuelsson (PAC) wrote: > @array = grep !/^\s*$/, @array; > This will return an array of elements (removing all elements that are either filled >with spaces or are blank) > > George. > > i read that it wasnt so good to use this in ther perlfaq: There is nothing wron

Don't know how to title this email.

2002-09-24 Thread chad kellerman
Hello everyone, I am sure this is a newbie question but I have never had to do this in a script and I am not quite too sure if I can. Is there a way I can "mark" a part of a script so that, if I wrap an eval around a particular statement I can go back to that mark and retry it. I have t

RE: Don't know how to title this email.

2002-09-24 Thread Rowe, Sean D.
how about using a label? -Original Message- From: chad kellerman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 9:19 AM To: Perl beginners Subject: Don't know how to title this email. Hello everyone, I am sure this is a newbie question but I have never had to do this i

File Compare

2002-09-24 Thread Hughes, James
Does anyone know if there is a function in perl thaat works like the fc (File Compare) function under dos or Unix? If so, plse let me know. Thanks, Jim -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Regular Expression

2002-09-24 Thread Jeff 'japhy' Pinyan
On Sep 24, Brian Ling said: >Does anyone know how to save any data that is matched >by regular expression, from within a string or array, >the match could occur any number of times. push @matches, $string =~ /pattern/g; I *think* that's what you want... you're being a little to vague, though.

Re: regexp hides info?

2002-09-24 Thread Jeff 'japhy' Pinyan
On Sep 24, David Samuelsson (PAC) said: >i want to remove certain elements from it: >so i ran: >for (@array){ >s/$current_user.*//; >} > >nw when i print it, all $current user are gone as i wanted, but its a big >space in the array instead. like: No, it's not

Re: File Compare

2002-09-24 Thread Sudarshan Raghavan
On Tue, 24 Sep 2002, Hughes, James wrote: > Does anyone know if there is a function in perl thaat works like the fc > (File Compare) function under dos or Unix? > > > If so, plse let me know. You can use File::Compare that comes with the standard distro perldoc File::Compare or downlo

can my code be shortened?

2002-09-24 Thread loan tran
Hi, I codes in the while loop is too long. Can it be written in different way? Thanks. sub display_helpdb{ my $server = $_[0]; my @results; &sybase_connect("$server","master","sp_helpdb"); $dbh->dbsqlexec; $dbh->dbresults; @tbl_header = ("DB Name", "DB Size", "Owner", "DBID", "Create

Re: can my code be shortened?

2002-09-24 Thread Robin Cragg
Hi, how about: while(@results = $dbh->dbnextrow){ print ""; foreach (@results) { print "$_<\n"; } print ""; } R At 08:19 24/09/2002 -0700, loan tran wrote: >Hi, >I codes in the while loop is too long. Can it be >written in different way? >

RE: can my code be shortened?

2002-09-24 Thread Bob Showalter
> -Original Message- > From: loan tran [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 24, 2002 11:20 AM > To: [EMAIL PROTECTED] > Subject: can my code be shortened? > > > Hi, > I codes in the while loop is too long. Can it be > written in different way? > Thanks. > > sub display_

Re: Converting to Hex

2002-09-24 Thread Randal L. Schwartz
> "John" == John W Krahn <[EMAIL PROTECTED]> writes: John> James Edward Gray II wrote: >> >> Is there a simple way, like a one liner perhaps, that will give me the >> octal/hex value of a character? I need to look certain characters up, >> so I would like to be able to give it something lik

A good use for RegEx substitutions?

2002-09-24 Thread Steven Arbitman
Hi, I have a problem which is simple to state: Find all prices in a file, multiply them by 2.5, and print out the file with the new prices. It seemed like a good use for substitution at first. The following successfully finds the prices and saves them in memory: /\$([0-9.]+)/ (a dollar sign

Re: MySQL & Perl (again)

2002-09-24 Thread dan
i was given this url: perldoc DBI (http://search.cpan.org/author/TIMB/DBI-1.30/DBI.pm) that's what i was referring to when i said DBI.pm dan "Ramprasad A Padmanabhan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > How have you 'looked at the DBI.pm' do a perl

Re: can my code be shortened?

2002-09-24 Thread Janek Schleicher
Robin Cragg wrote at Tue, 24 Sep 2002 17:26:24 +0200: > how about: > > while(@results = $dbh->dbnextrow){ > print ""; > foreach (@results) { > print "$_<\n"; ^ > } > print ""; > } Or still shorter: while (my @

Finding a Pattern in a File

2002-09-24 Thread Jessee Parker
Hi all, What I'm trying to do is find some type of user defined delimiter in a file so that I can combine 2 files into 1. An example of the file would be: ## HTML ## some HTML code ## TEXT ## some text Any help would be greatly appreciated. I'm fairly new to Perl and I don't know wh

Re: A good use for RegEx substitutions?

2002-09-24 Thread Jenda Krynicky
From: "Steven Arbitman" <[EMAIL PROTECTED]> > I have a problem which is simple to state: > > Find all prices in a file, multiply them by 2.5, and print out the > file with the new prices. > > It seemed like a good use for substitution at first. > > The following successfully finds the prices a

Re: Finding a Pattern in a File

2002-09-24 Thread Jessee Parker
Sorry to make this a little clearer, I want to find the delimiter and then process what's past the delimiter. So all the html code would go into a variable and then all the text would go into a different variable. Sorry for the confusion. Jessee

Sync'ing an NT Domain Controller

2002-09-24 Thread Hussey, Bill [IT]
Win32API::Net seems to be lacking a way to do a domain sync. Anyone have a lead for me? Bill -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: A good use for RegEx substitutions?

2002-09-24 Thread nkuipers
Using the /g modifier would be appropriate. Consider using the /e modifier which causes perl to execute code in the "replace-with" part of the s///. The following is from the Camel 3rd Ed, page 209: s/(\d+)/$1 * 2/; #Replaces "42" with "42 * 2" s/(\d+)/$1 * 2/e; #Replaces "42" with "84" Chee

RE: Finding a Pattern in a File

2002-09-24 Thread Hussey, Bill [IT]
If it's as simple as you're making it sound, the "split" function is for you. @arrayName = split(/delimiter/, $string); So your new array is @arrayName @arrayName[0] is what's before the delimiter ... @arrayName[1] is what's after it. put your delimiting character in between the forward slashes

Re: A good use for RegEx substitutions?

2002-09-24 Thread John W. Krahn
Jenda Krynicky wrote: > > From: "Steven Arbitman" <[EMAIL PROTECTED]> > > > I have a problem which is simple to state: > > > > Find all prices in a file, multiply them by 2.5, and print out the > > file with the new prices. > > > > It seemed like a good use for substitution at first. > > > > The

Using a variable name to invoke a subroutine

2002-09-24 Thread Zielfelder, Robert
I have a script that uses an array to determine weather or not a subroutine needs to be run or not. I want to be able do a foreach on the array and invoke the subroutine using the control variable. The names of the subroutines are the same as the items inside the array. This is what I have so f

RE: Using a variable name to invoke a subroutine

2002-09-24 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Instead of an array, you could change to a hash and use the subroutine name as the key. Then if the key is defined, you execute otherwise bypass. Wags ;) -Original Message- From: Zielfelder, Robert [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 10:44 To: '[EMAIL PR

RE: join hashes?

2002-09-24 Thread david
Keith wrote: > I've been working with perl for a while now, and I still have not been > able to grasp the concept of references. I've got Beginning Perl by Simon > Cozens published by Wrox, I have the Camel, and the cookbook. After > reading the information, and trying to ask people as well I sti

RE: Using a variable name to invoke a subroutine

2002-09-24 Thread Balint, Jess
Or you could fill the array with sub refs: $array[0] = \&sub0; &{$array[0]}; -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 1:55 PM To: 'Zielfelder, Robert'; '[EMAIL PROTECTED]' Subject: RE: Using

RE: Using a variable name to invoke a subroutine

2002-09-24 Thread Hussey, Bill [IT]
You're going about it the wrong way. I assume that based on some previous criteria, you need to perform a certain action, and you have that criteria stored in the array: @list_of_subs See if this works for you. Create 1 sub, which we'll call MySub. Pass it whatever is in the array, and have a b

RE: Using a variable name to invoke a subroutine

2002-09-24 Thread nkuipers
>foreach $sub (@list_of_subs) { > &{$sub}; ##-- this is the part I am stuck on. This doesn't work >} I don't know the answer to your question; I'm also interested in what others have to say. However, I have to wonder if Perl is looking at &{$sub} and interpretting it as a command to ex

Re: Using a variable name to invoke a subroutine

2002-09-24 Thread WyvernGod
here is two examples of that work for me require "pl/require.pl"; $functiontocall ='RequireAll'; $functiontocall->(); -- - my $alias = "home|SplitInput,LoadVariables,DirectUser,"; my ($name, $subs) = split(/\|/, $al

RE: Using a variable name to invoke a subroutine

2002-09-24 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Here is a small script which loads some subs and then depending on what you enter, then executes the sub inputted: #!perl -w my %MyHash = qw(sub0 1 sub1 1 sub2 1 sub3 1 sub4 1 sub5 1 sub6 1 sub7 1 sub10 1 sub11 1 ); foreach my $MyKeys (sort keys %MyHash) { printf "%-

Re: Finding a Pattern in a File

2002-09-24 Thread david
Jessee Parker wrote: > Sorry to make this a little clearer, I want to find the delimiter and then > process what's past the delimiter. So all the html code would go into a > variable and then all the text would go into a different variable. Sorry > for the confusion. > > Jessee try the followi

Re: Array Handling

2002-09-24 Thread david
Rohit Mishra-R53658 wrote: > Hi all, > > Is there any way to open a "handle" to an array as we open a handle to a > file?? The condition being we can use that "array handle" everywhere we > can use a file handle > why would you want to do that? to save yourself not having to move the whol

Removing a directory

2002-09-24 Thread eric-perl
Hello, All: What's the simplest method to remove a directory *and* it's contents? (rmdir only works on empty directories.) -- Eric P. Sunnyvale, CA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Removing a directory

2002-09-24 Thread Frank Wiles
.--[ [EMAIL PROTECTED] wrote (2002/09/24 at 10:38:59) ]-- | | Hello, All: | | What's the simplest method to remove a directory *and* it's contents? | (rmdir only works on empty directories.) | `- rm -rf but be careful, a

Re: Array Handling

2002-09-24 Thread Felix Geerinckx
on Tue, 24 Sep 2002 13:46:32 GMT, Rohit Mishra-R53658 wrote: > Is there any way to open a "handle" to an array as we open a handle > to a file?? The condition being we can use that "array handle" > everywhere we can use a file handle http://search.cpan.org/author/ERYQ/IO-stringy-2.108/lib/I

Re: Using a variable name to invoke a subroutine

2002-09-24 Thread david
Robert Zielfelder wrote: > > I have a bunch of subroutines defined in the script, but they don't need > to > be invoked unless the "@list_of_subs" contains the name of the sub. I > know that I could stick a bunch of if statements in there and make this > work, but > I am trying to be a little mo

Re: Removing a directory

2002-09-24 Thread david
Frank Wiles wrote: > .--[ [EMAIL PROTECTED] wrote (2002/09/24 at 10:38:59) ]-- > | > | Hello, All: > | > | What's the simplest method to remove a directory *and* it's contents? > | (rmdir only works on empty directories.) > | > `

re: loadable object !!!!!!

2002-09-24 Thread William Black
Hello All, Where does a loadable object for a particular module get stored (ie what directory)? Below is the error message i'm getting. Can't locate loadable object for module Time::HiRes in @INC (@INC contains: /usr/local/ActivePerl-5.6/lib/5.6.1/sun4-solaris-thread-multi /usr/local/ActiveP

Re: Don't know how to title this email.

2002-09-24 Thread Michael Fowler
On Tue, Sep 24, 2002 at 10:18:58AM -0400, chad kellerman wrote: > Is there a way I can "mark" a part of a script so that, if I wrap an > eval around a particular statement I can go back to that mark and retry > it. > > I have to make quite a few ssh connections to various servers, I was > won

Re: Using a variable name to invoke a subroutine

2002-09-24 Thread Michael Fowler
On Tue, Sep 24, 2002 at 01:43:50PM -0400, Zielfelder, Robert wrote: > > foreach $sub (@list_of_subs) { > &{$sub}; ##-- this is the part I am stuck on. This doesn't work > } > This is called a soft reference, and soft references are generally a bad idea. However, it should work.

Re: Removing a directory

2002-09-24 Thread Michael Fowler
On Tue, Sep 24, 2002 at 10:38:59AM +0800, [EMAIL PROTECTED] wrote: > What's the simplest method to remove a directory *and* it's contents? > (rmdir only works on empty directories.) I'm somewhat surprised by the advice given so far (rm -rf and File::Remove; the first isn't portable, the second r

Re: loadable object !!!!!!

2002-09-24 Thread Michael Fowler
On Tue, Sep 24, 2002 at 03:08:44PM -0400, William Black wrote: > Where does a loadable object for a particular module get stored (ie what > directory)? Below is the error message i'm getting. In @INC, in one of the architecture-specific directores, under an auto subdirectory. You shouldn't nee

Re: Removing a directory

2002-09-24 Thread eric-perl
On Tue, 24 Sep 2002, Michael Fowler wrote: > On Tue, Sep 24, 2002 at 10:38:59AM +0800, [EMAIL PROTECTED] wrote: > > What's the simplest method to remove a directory *and* it's contents? > > (rmdir only works on empty directories.) > > I'm somewhat surprised by the advice given so far (rm -rf an

Re: How do you add a path to @INC

2002-09-24 Thread William Black
Hello all, How do you add a path to @INC? >From: Michael Fowler <[EMAIL PROTECTED]> >To: William Black <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: loadable object !! >Date: Tue, 24 Sep 2002 12:21:08 -0800 > >On Tue, Sep 24, 2002 at 03:08:44PM -0400, William Black wrote: > > Wh

Sun Sparcstation 20 and Perl?

2002-09-24 Thread Kevin Pfeiffer
Sorry to pose a slightly off-topic question... A colleague has a Sun Sparcstation 20 for sale. He says it will run linux. I was thinking it might be a good project machine for running an Apache server, trying out some cgi scripts, Perl, etc. Any opinions on whether this might be suitable? (du

Re: How do you add a path to @INC

2002-09-24 Thread david
William Black wrote: > Hello all, > > How do you add a path to @INC? > > the simplest way would be just to use the 'use lib' pragmas like: use lib 'path you want to add to @INC'; or: BEGIN{ push(@INC,'path you want to add to @INC'); } david -- To unsubscribe, e-mail: [EMAIL PROTE

retarded question about non-root mod installation

2002-09-24 Thread nkuipers
Hello all, When trying to install modules, it's all dandy until I get to the %make install part and then it cacks out with an error. I need to be root to install it into the path. How do I make install somewhere else? I can then explicity push onto @INC within my script. Thanks, Nathanael

Re: retarded question about non-root mod installation

2002-09-24 Thread Janek Schleicher
Nkuipers wrote at Tue, 24 Sep 2002 23:27:08 +0200: > When trying to install modules, it's all dandy until I get to the > > %make install > > part and then it cacks out with an error. I need to be root to install it > into the path. How do I make install somewhere else? I can then explicity

Re: retarded question about non-root mod installation

2002-09-24 Thread Michael Fowler
On Tue, Sep 24, 2002 at 02:27:08PM -0700, nkuipers wrote: > How do I make install somewhere else? I can then explicity push onto @INC > within my script. See perldoc -q 'my own module'. That's the second time I've given that advice out today. Anyone for a third? :) Michael -- Administrator

Re: How do you add a path to @INC

2002-09-24 Thread Michael Fowler
On Tue, Sep 24, 2002 at 04:36:47PM -0400, William Black wrote: > How do you add a path to @INC? See perldoc -q 'my own module' for information on installing and using a module installed into your own library directory. The advice works equally well for modules installed in other non-standard loc

Re: Using a variable name to invoke a subroutine

2002-09-24 Thread John W. Krahn
Robert Zielfelder wrote: > > I have a script that uses an array to determine weather or not a subroutine > needs to be run or not. I want to be able do a foreach on the array and > invoke the subroutine using the control variable. The names of the > subroutines are the same as the items inside

Re: Sun Sparcstation 20 and Perl?

2002-09-24 Thread david
Kevin Pfeiffer wrote: > Sorry to pose a slightly off-topic question... > > A colleague has a Sun Sparcstation 20 for sale. He says it will run linux. > I was thinking it might be a good project machine for running an Apache > server, trying out some cgi scripts, Perl, etc. > > Any opinions on w

GD::Graph::pie -- adding text with GD::Text:Wrap -- How ?

2002-09-24 Thread Lancashire, Pete
My brain is blocking something really simple here. What I want to do is add a block of text to a image created as my $graph = new GD::Graph::pie(1200, 1200); Could someone show me an example of adding a wrapbox of text to this image ? Thanks, -pete -- To unsubscribe, e-mail: [EMAIL PRO

Regular Expression help

2002-09-24 Thread Shaun Bramley
Hi all. I am hoping that someone can help me determine what is wronf with my regualr expression. background info: @array contains 'text', numbers, INT, or TINYINT. I am trying to identify if the array element is a number. What I have right now is: if($array[$x] =~ /\d{1,3}?/) { do somethi

RE: Regular Expression help

2002-09-24 Thread nkuipers
>if($array[$x] =~ /\d{1,3}?/) >{ >...do something >} > >Unfortunately this if statement never appears to come true. That's because you have two quantifiers specified, the {1,3} and the ?. for (@array) { if ( m/^\d+$/ ) { #regex breaks on decimal numbers do something... } } -- To unsubscribe

Re: Sun Sparcstation 20 and Perl?

2002-09-24 Thread B-E-G Gomes
It definitely depends on price. A sparc 20 isn't even a match for most Pentium IIIs running just about any flavor of UNIX or LINUX. Not to mention, hardware is proprietary (uses S-bus not PCI bus), a special keyboard is needed, and monitor, unless you get a converter. If your not going to use

RE: Regular Expression help

2002-09-24 Thread Mark Anderson
see my comments at bottom... -Original Message- From: Shaun Bramley [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 4:39 PM To: [EMAIL PROTECTED] Subject: Regular Expression help Hi all. I am hoping that someone can help me determine what is wronf with my regualr expressio

Re: Sun Sparcstation 20 and Perl?

2002-09-24 Thread Mute
I have an Ultra5 running Debian Sparc64 dist.. runs perfect. Probably my favorite install i've got running but that might just be due to how much time i've spent on it. It's cpu utilization is pretty damn impressive too. I've got a dual 500 (maybe its dual 400, can't recall). Anyways, I do mo

Collecting directory and file info. on Windows NT

2002-09-24 Thread Makarov Gera x8521
Hi there, I am looking for a way of collecting directory and file information on Window NT, i.e. permissions, ownership, size, creation and modification timestamp etc and putting it in a csv file. If you know of any existing scripts somewhere on the web could you please let me know. Thanks in

Array not being passed into a subroutine

2002-09-24 Thread Shaun Bramley
Hello all, I currently currently passing a subroutine one scalar value and two arrays. Both array's work before and after the function call. However only one of hte arrays works within the subroutine. example code: print @array1; //this works print @array2; //this works subroutine($a, @array

Re: Array not being passed into a subroutine

2002-09-24 Thread John W. Krahn
Shaun Bramley wrote: > > Hello all, Hello, > I currently currently passing a subroutine one scalar value and two arrays. > Both array's work before and after the function call. However only one of > hte arrays works within the subroutine. > > example code: > > print @array1; //this works >

RE: Array not being passed into a subroutine

2002-09-24 Thread Tiller, Jason
Hi, Shaun, :) > I currently currently passing a subroutine one scalar value and two > arrays. Hmm. This is not what you're doing in the example code. In the example code, this line: subroutine($a, @array1, @array2); says "Call subroutine with arguments of $a, all of the entries in @array1, a

RE: Array not being passed into a subroutine

2002-09-24 Thread Timothy Johnson
When you pass an array to a subroutine in Perl, it takes the arguments and passes a list, I _think_ even if you use that format. It would be much better, IMHO to use references. Something like: ### SCRIPT # use strict;#Get in the habit of using th

Re: reading /var/spool/mail

2002-09-24 Thread Hengky
thx for the help, i've already using a pop3 like Net::POP3 or even create a open port to listen. but my script is on the pop3 server so if i have to login to myself it useless. if i have to install setuid it's dangerous or not... ? one of my friend say if i install setuid and setgid it's dang