call one perl script within another

2003-10-20 Thread Ramprasad A Padmanabhan
How Can I call a perl script within my main script If I do $response=`perl $somescript $args`; This will call a new perl process, and may be more expensive on the system. On the other hand I can do do "$somescript $args"; But How do I get the reponse of the script. Is there a way or s

Tokens??

2003-10-20 Thread PerlDiscuss - Perl Newsgroups and mailing lists
HI, I am brand new to Perl and I am trying to modify a script that someone else wrote. I have this line where primaryntaccount = something like this domainname\userid Token=primaryntaccount:: %ntaccount% = (\\w+).*$ I want to pass a different value for primaryntaccount which I am getting by th

Apache::Session vs CGI::Session

2003-10-20 Thread perl
Can someone comment on some advantages/disadvantages? Or they are different thing altogether? Does opening a new browser causes a new session in either of the two? thanks - eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail: [EMAIL PR

Re: How do you find out the size of a file

2003-10-20 Thread John W. Krahn
Chinku Simon wrote: > > Hi, Hello, > I have a requirement to find out the size of a file existing in an NTFS file system. my $file_size = -s $file_name; perldoc -f -s John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: CPAN, perl, dependencies, apt-get?

2003-10-20 Thread Robert Citek
At 04:56 PM 10/20/2003 -0500, Robert Citek wrote: ... How do I correct this? Should I just create the file (e.g using touch)? Doing a touch seemed to work. Any caveates to doing this? Regards, - Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: CPAN, perl, dependencies, apt-get?

2003-10-20 Thread Robert Citek
At 04:40 PM 10/20/2003 -0500, Robert Citek wrote: ... However, when I exited the CPAN shell, these two tests worked just fine: # perl -MXML::Simple -e ';' # perl -MXML::SAX -e ';' I guess it worked afterall. Now on to testing real code. I spoke too soon. I am trying the sample code from the O

Re: CPAN, perl, dependencies, apt-get?

2003-10-20 Thread Robert Citek
At 01:12 PM 10/20/2003 -0700, LoneWolf wrote: root>perl -MCPAN -e shell when it comes up to the shell put this in: o conf prerequisites_policy follow At 01:45 PM 10/20/2003 -0600, Wiggins d Anconia wrote: Are you getting an error from CPAN?? Eventually, yes but I guess the error messages did not ma

RE: How do you find out the size of a file

2003-10-20 Thread Brad Fike
I use the stat function. -Brad >-Original Message- >From: Chinku Simon [mailto:[EMAIL PROTECTED] >Sent: Monday, October 20, 2003 4:24 PM >To: [EMAIL PROTECTED] >Subject: How do you find out the size of a file > > >Hi, > >I have a requirement to find out the size of a file existing >in a

RE: How do you find out the size of a file

2003-10-20 Thread Hanson, Rob
Try stat(). It is a built-in function. >From perldoc -f stat: stat FILEHANDLE stat EXPR statReturns a 13-element list giving the status info for a file, either the file opened via FILEHANDLE, or named by EXPR. If EXPR is omitted, it stats "$_". Returns a null list i

How do you find out the size of a file

2003-10-20 Thread Chinku Simon
Hi, I have a requirement to find out the size of a file existing in an NTFS file system. Are there any suitable modules that can be used? Thanks in advance Chinku __ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com

Beginning beginner needing references help

2003-10-20 Thread Jonathan Mangin
Jeez, this is a beginner's list? Y'all are defining my ignorance of this here purrl stuff. I hope someone with patience can help me out. In a simple login/registration program using 5.6.1... #!/usr/bin/perl -wT use strict; [CGI and DBI stuff] $countryid="1"; $statename=$gotcha; @r_states=getSta

Re: CPAN, perl, dependencies, apt-get?

2003-10-20 Thread LoneWolf
If you are root on your own system and have access to the command line do this: root>perl -MCPAN -e shell when it comes up to the shell put this in: o conf prerequisites_policy follow It will automagically go after the prerequisites for the current Module that you are installing. Robert >On M

Re: CPAN, perl, dependencies, apt-get?

2003-10-20 Thread Wiggins d Anconia
> > Hello all, > > What is the easiest way to install a module from CPAN that has several > dependencies? Specifically, I want to install XML::Simple. However, that > module depends on a few other perl modules. For now, I'm downloading the > modules individually and installing them. But

CPAN, perl, dependencies, apt-get?

2003-10-20 Thread Robert Citek
Hello all, What is the easiest way to install a module from CPAN that has several dependencies? Specifically, I want to install XML::Simple. However, that module depends on a few other perl modules. For now, I'm downloading the modules individually and installing them. But this seems to be

Re: matching help needed

2003-10-20 Thread Wiggins d Anconia.org
> Steve Massey wrote: > > > > using the following code.. I am looking to match any text that has a date in > > it ie 8-Nov, nut my code also matches 8-11b, which is not what I want > > > > help appreciated > > > > Steve > > > > > > > > #! /usr/bin/perl -w > > > > $test = "8-11b1"; > > ##$

Re: matching help needed

2003-10-20 Thread Rob Dixon
Steve Massey wrote: > > using the following code.. I am looking to match any text that has a date in > it ie 8-Nov, nut my code also matches 8-11b, which is not what I want > > help appreciated > > Steve > > > > #! /usr/bin/perl -w > > $test = "8-11b1"; > ##$test = "8-Nov1"; > > if ( $te

RE: Aliases in Perl?

2003-10-20 Thread Jeff Westman
"Bakken, Luke" <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Are there 'aliases' in perl? For example, if I have a Korn > > shell script and > > a function named "increaseCost()", I can do this: "alias > > decreaseCose=increaseCost" (passing a parameter in). of > > course this is a > > simpl

Re: Aliases in Perl?

2003-10-20 Thread Rob Dixon
Jeff Westman wrote: > > Are there 'aliases' in perl? For example, if I have a Korn shell script and > a function named "increaseCost()", I can do this: "alias > decreaseCose=increaseCost" (passing a parameter in). of course this is a > simplified example of what I want to do, but the point is

RE: matching help needed

2003-10-20 Thread Mark Anderson
> using the following code.. I am looking to match any text that has a date in > it ie 8-Nov, nut my code also matches 8-11b, which is not what I want > > #! /usr/bin/perl -w > > $test = "8-11b1"; > ##$test = "8-Nov1"; > > if ( $test =~ /(\d{1,2})\-(\w{3})([\d\w]*)/) { > $day = $1;

RE: Aliases in Perl?

2003-10-20 Thread Bakken, Luke
> Hi, > > Are there 'aliases' in perl? For example, if I have a Korn > shell script and > a function named "increaseCost()", I can do this: "alias > decreaseCose=increaseCost" (passing a parameter in). of > course this is a > simplified example of what I want to do, but the point is to mak

RE: Aliases in Perl?

2003-10-20 Thread Stephen Hardisty
> Hi, > > Are there 'aliases' in perl? For example, if I have a Korn shell script and > a function named "increaseCost()", I can do this: "alias > decreaseCose=increaseCost" (passing a parameter in). of course this is a > simplified example of what I want to do, but the point is to make > it

Aliases in Perl?

2003-10-20 Thread Jeff Westman
Hi, Are there 'aliases' in perl? For example, if I have a Korn shell script and a function named "increaseCost()", I can do this: "alias decreaseCose=increaseCost" (passing a parameter in). of course this is a simplified example of what I want to do, but the point is to make it self-document

matching help needed

2003-10-20 Thread Steve Massey
Hi All using the following code.. I am looking to match any text that has a date in it ie 8-Nov, nut my code also matches 8-11b, which is not what I want help appreciated Steve #! /usr/bin/perl -w $test = "8-11b1"; ##$test = "8-Nov1"; if ( $test =~ /(\d{1,2})\-(\w{3})([\d\w]*)/) {

RE: lowercase

2003-10-20 Thread EUROSPACE SZARINDAR
Hola Andrés, You can also use the "tr" command $stri =~ tr/A-Z/a-z/ The "tr" command also returns the number of transliteration (like s///) $stri = "Joana Prado"; if (my $tr_modif = ($stri =~ tr/A-Z/a-z/)) { print "number of modification = $tr_modif\n"; } else { print "nothing

RE: array of arrays

2003-10-20 Thread Stephen Hardisty
Alright then, first you want to think about how you are going to populate the arrays. For example, if I have a file that contains the following data: 1|10 5|7 I would do this: open(FH, "< bob.txt"); my @file_list; while() { # add a reference of the 2 file columns to @file_list

Re: array of arrays

2003-10-20 Thread Tassilo von Parseval
On Mon, Oct 20, 2003 at 12:33:00PM +0200 Christiane Nerz wrote: > How do I read data out of a table-file in an array-of-arrays? > > Problem: I have to compare two tables with pairs of start-stop-Positions. > I want to find out, which pair of Start-Stop-Position in table_1 is > entirely within th

Antwort: RE: array of arrays

2003-10-20 Thread Manfred . Beilfuss
Hi, I don't know what the question really is, may be she asks for a algorythm ? Then i think she show's, that she has $a_min, $a_max, $b_min and $b_max and that $a LE $b means (($a_

Re: lowercase

2003-10-20 Thread Andrew Shitov
$lower_case = lc ($stri); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: array of arrays

2003-10-20 Thread Christiane Nerz
... from two text files. Output of a pattern-searching-program and data out of a DB (genebank). No prob to read in those data in a textfile too. Stephen Hardisty wrote: How do I read data out of a table-file in an array-of-arrays? Problem: I have to compare two tables with pairs of start-stop-P

RE: array of arrays

2003-10-20 Thread Stephen Hardisty
> How do I read data out of a table-file in an array-of-arrays? > > Problem: I have to compare two tables with pairs of start-stop-Positions. > I want to find out, which pair of Start-Stop-Position in table_1 > is > entirely within the range marked by a pair of start-stop-positions of > the seco

array of arrays

2003-10-20 Thread Christiane Nerz
Hi! How do I read data out of a table-file in an array-of-arrays? Problem: I have to compare two tables with pairs of start-stop-Positions. I want to find out, which pair of Start-Stop-Position in table_1 is entirely within the range marked by a pair of start-stop-positions of the second table.

Re: lowercase

2003-10-20 Thread Gabor Urban
From: "Andre Chaves Mascarenhas" <[EMAIL PROTECTED]> Subject: lowercase Date: Mon, 20 Oct 2003 07:48:15 -0200 > Hi if i have an string lets say > $stri="Joana Prado"; > How do i transformm it into > "joana prado" > (all lowercase) > Thanks Hi, I would try the s operator with a regex. You could c

Re: lowercase

2003-10-20 Thread Owen Cook
On Mon, 20 Oct 2003, Andre Chaves Mascarenhas wrote: > Hi if i have an string lets say > $stri="Joana Prado"; > How do i transformm it into > "joana prado" > (all lowercase) $stri=lc("Joana Prado"); Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

RE: lowercase

2003-10-20 Thread Stephen Hardisty
> Hi if i have an string lets say > $stri="Joana Prado"; > How do i transformm it into > "joana prado" > (all lowercase) > Thanks The lc function returns the lower case of a string: my $lower_case_string = lc($stri); This e

lowercase

2003-10-20 Thread Andre Chaves Mascarenhas
Hi if i have an string lets say $stri="Joana Prado"; How do i transformm it into "joana prado" (all lowercase) Thanks

Re: Changing file ownership

2003-10-20 Thread Rob Dixon
Rick Edwards wrote: > > I'm trying to change the ownership and permissions on a file but using > > unless (`chown root:root $working_file`) { > do_something > } > > Throws an "illegal seek" error. The only other alternative is to stat a > file owned by root to get the uid etc, and then use perl'

Changing file ownership

2003-10-20 Thread Rick Edwards
I'm trying to change the ownership and permissions on a file but using unless (`chown root:root $working_file`) { do_something } Throws an "illegal seek" error. The only other alternative is to stat a file owned by root to get the uid etc, and then use perl's in built chown function to change

Re: is next implied in a set of if elsifs?

2003-10-20 Thread Steve Grazzini
On Sun, Oct 19, 2003 at 08:02:34PM -0700, R. Joseph Newton wrote: > I think your formatting may reflect a misconception about if and > elsif staements. > > while ($foo) { > if ($condition_1) { > do_1(); > } > elsif ($condition_2) { > do_2(); > } > # ... > } > > Should be: Wait a m