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
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
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
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
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
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
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
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
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
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
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
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
>
> 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
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
> 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";
> > ##$
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
"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
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
> 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;
> 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
> 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
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
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]*)/) {
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
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
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
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_
$lower_case = lc ($stri);
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
... 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
> 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
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.
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
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
> 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
Hi if i have an string lets say
$stri="Joana Prado";
How do i transformm it into
"joana prado"
(all lowercase)
Thanks
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'
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
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
38 matches
Mail list logo