On Thu, 2004-05-13 at 07:03, Michael Terry wrote:
> Hi,
>
> I've got this shell script:
>
> #!/bin/sh
> ps axc|awk "{if (\$5==\"$1\") print \$1}";
>
> ... which gets a PID if you feed it the process' name. Is there a way
> to translate this into Perl using a standard Perl distribution? I mean,
Hello list,
Perl::Tidy is very excellent for making source look nice.
I was wondering if anyone knew of anything that is the same type of idea
but it optomizes your Perl code to run a bit faster:
for instance:
$newvariable = "$howdy";
should be:
$newvariable = $howdy;
and
$stuff = "hell
Check the documentation for the File::Find module. It comes standard
with most Perl distributions.
-Original Message-
From: LK Tee [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 6:52 PM
To: '[EMAIL PROTECTED]'
Subject: How to find files in subdirectory
Hi, I'm perls beginner
Hi, I'm perls beginner now, I have a problem when create a script find all
file in subdirectory that have the same filename. How I write the script
using perl and return the result like below:
File1: ~/A/File~/A/AA/file1 ~/A/C/CC/CCC/file
Kuan.
> -Message d'origine-
> De : Richard Crawford [mailto:[EMAIL PROTECTED]
> Envoyé : mercredi 12 mai 2004 22:17
> À : NYIMI Jose (BMB)
> Cc : Alok Bhatt; [EMAIL PROTECTED]
> Objet : Re: DBD for SQL Server?
>
> NYIMI Jose (BMB) wrote:
>
> >
> >>-Original Message-
> >>From: Alok Bha
Hi,
I've got this shell script:
#!/bin/sh
ps axc|awk "{if (\$5==\"$1\") print \$1}";
... which gets a PID if you feed it the process' name. Is there a way
to translate this into Perl using a standard Perl distribution? I mean,
without calling 'ps'; I've learned enough Perl now to be able to do
As part of a program I'm writing, I need to read some variables from a bash
script and do some bash-style interpolation. My current code:
sub get_depend {
my $ebuildfname = shift;
my $ebuildcontents;
my %ebuildvars;
my $pkgname = $ebuildfname;
$pkgname =~ s|/usr/portage/||;
$pkgname =
Next and hopefully last question for now on a more general subject: Why do
array members take the form of 'ARRAY(0x90df74)' rather than the actual
content fed to an array or variable?
Whatever variable looks like that when printed if an array reference.
for(@links) {
print @{$_};
}
see
perldoc p
On May 12, Andrew Gaffney said:
>> This sounds like postorder tree traversal to me:
>
>I've seen that term before when looking into this, but I don't know what
>it means.
I'd suggest bookmarking the wikipedia, it has a lot of encyclopedia-style
definitions (read, long texts and examples) of compu
On Wed, 2004-05-12 at 17:34, [EMAIL PROTECTED] wrote:
> Hello.
>
> I'm looking for a script, and definitly willing to roll my own, that
> interacts with htaccess. It is quite simple to validate user input against
> the .htpasswd file and authenticate them into a given directory. But i
> need Apa
I'm now working in an environment in which I'll have to deploy
VB.NET apps (don't blame me). Anyway, I have some perl stuff I'd
like not to reinvent in VB, dealing with database reporting. Are
there any good resources that will show me how I might deploy a
VB-based form that actually runs a Perl pr
On 5/12/04 1:26 PM, Paul Johnson wrote:
> On Wed, May 12, 2004 at 12:59:44PM -0500, Ben Miller wrote:
>
>> my @links = $mech->find_all_links(tag = "a", text_regex => qr/\bWORD\b/i );
>
> ... tag => "a", ...
>
> I suspect.
Thank you to Paul and to Lee for their quick and efficient answer. That
Jeff 'japhy' Pinyan wrote:
On May 12, Andrew Gaffney said:
my %tree = { package1 => [ package2, package3, package4 ],
package2 => [ package7 ],
package3 => [ package5 ],
package4 => [ package7, package6],
package5 => [ ],
package6 => [ ]
In a program I'm working on, I build a hash "tree" of sorts that contains
package dependencies. Each key contains an array with the first level
dependencies of the key. Each one of those dependencies have their own key with
their first level dependencies in the hash. For example:
my %tree = { p
Hello.
I'm looking for a script, and definitly willing to roll my own, that
interacts with htaccess. It is quite simple to validate user input against
the .htpasswd file and authenticate them into a given directory. But i
need Apache to accept the user as a valid user, and not repompt with the
b
Andrew Gaffney wrote:
Wiggins d Anconia wrote:
Wiggins d Anconia wrote:
my %masks;
my %use;
my @pkglist;
my %pkgdeps;
Why are these declared with a global scope? If they must be then
something is wrong with your subs. Move these to after your sub
listing, if your program still works then th
On Tue, 2004-05-11 at 18:40, Richard Crawford wrote:
> Is there a DBD for SQL Server so that I can connect to our SQL Server
> 2000 database with DBI? I've hunted all over CPAN but I can't seem to
> find one.
Richard,
I'm running a mod_perl site connected to a SQL Server 2000 backend via
DBD::
Wiggins d Anconia wrote:
Wiggins d Anconia wrote:
my %masks;
my %use;
my @pkglist;
my %pkgdeps;
Why are these declared with a global scope? If they must be then
something is wrong with your subs. Move these to after your sub
listing, if your program still works then they are fine as globals,
ot
NYIMI Jose (BMB) wrote:
-Original Message-
From: Alok Bhatt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 11:49 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: DBD for SQL Server?
--- Richard Crawford <[EMAIL PROTECTED]>
wrote:
Is there a DBD for SQL Server so that
> Wiggins d Anconia wrote:
> >>
> >>my %masks;
> >>my %use;
> >>my @pkglist;
> >>my %pkgdeps;
> >
> > Why are these declared with a global scope? If they must be then
> > something is wrong with your subs. Move these to after your sub
> > listing, if your program still works then they are fine
Wiggins d Anconia wrote:
Charles K. Clarkson wrote:
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
:
: I think that 'my' is bad because I have something similar to:
:
: my %tree;
:
: sub return_an_arrayref() {
:my @array = ('thing1', 'thing2', 'thing3');
:return [EMAIL PROTECTED];
: }
:
: s
[snip]
>
> It was more pseudocode than anything. I can't seem to duplicate the
problem with
> test code. One thing I forgot to mention is that these functions are
called
> recursively as far as 15 levels deep. Would that cause issues when
returning a
> ref to a 'my'ed array from a function?
>
> Charles K. Clarkson wrote:
> > Andrew Gaffney <[EMAIL PROTECTED]> wrote:
> > :
> > : I think that 'my' is bad because I have something similar to:
> > :
> > : my %tree;
> > :
> > : sub return_an_arrayref() {
> > :my @array = ('thing1', 'thing2', 'thing3');
> > :return [EMAIL PROTECTED]
Wiggins d Anconia wrote:
Wiggins d Anconia wrote:
I have a number of functions in a program I'm writing that return a
reference to
an array or hash. In the functions, I declare the variable to return
with 'my'
which I'm finding out is bad. Should I declare variables to return
from a
functi
Charles K. Clarkson wrote:
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
:
: I think that 'my' is bad because I have something similar to:
:
: my %tree;
:
: sub return_an_arrayref() {
:my @array = ('thing1', 'thing2', 'thing3');
:return [EMAIL PROTECTED];
: }
:
: sub build_tree() {
:for
Andrew Gaffney <[EMAIL PROTECTED]> wrote:
:
: I think that 'my' is bad because I have something similar to:
:
: my %tree;
:
: sub return_an_arrayref() {
:my @array = ('thing1', 'thing2', 'thing3');
:return [EMAIL PROTECTED];
: }
:
: sub build_tree() {
:foreach(@thing) {
: $tree
> Wiggins d Anconia wrote:
> >>I have a number of functions in a program I'm writing that return a
> >
> > reference to
> >
> >>an array or hash. In the functions, I declare the variable to return
> >
> > with 'my'
> >
> >>which I'm finding out is bad. Should I declare variables to return
fro
Wiggins d Anconia wrote:
I have a number of functions in a program I'm writing that return a
reference to
an array or hash. In the functions, I declare the variable to return
with 'my'
which I'm finding out is bad. Should I declare variables to return from a
function with 'our'? Do I need to m
> I have a number of functions in a program I'm writing that return a
reference to
> an array or hash. In the functions, I declare the variable to return
with 'my'
> which I'm finding out is bad. Should I declare variables to return from a
> function with 'our'? Do I need to make sure I don't ha
I have a number of functions in a program I'm writing that return a reference to
an array or hash. In the functions, I declare the variable to return with 'my'
which I'm finding out is bad. Should I declare variables to return from a
function with 'our'? Do I need to make sure I don't have confl
Text::KwikiFormatish seems like a great module to format Wiki text into HTML.
However, when I install it and run it on my Windows XP system, I got tons
of "Unrecognized escape \p ..." errors. Then the output has a lot of
extraneous anchored links where there should not be any.
Does anybody kn
Please bottom post
> my openconf function contains:
>
> sub openconf {
>my $pkg = shift;
>my $self = bless([EMAIL PROTECTED],$pkg);
>open(...
>
>return($self);
> }
>
> I have "my @config;" set at the beggining of the module
>
As Lee pointed out it would be easier to
I have the following code that starts two different processes/perl scripts.
The code correctly calls and processes the perl scripts, but never seems to
return back to the calling script for further processing. Does anyone have
any clue why this might happen?
#Create dal process
if ($OK == 0)
[EMAIL PROTECTED] wrote:
my openconf function contains:
sub openconf {
my $pkg = shift;
my $self = bless([EMAIL PROTECTED],$pkg);
open(...
I don;'t think
open(...
will work :)
Wy not share the whole code and also param() or how can we help :)
return($self);
}
Lee.M
Ben Miller wrote:
Hi,
Hello,
I'm reading/scraping hyperlinks from a specific web page using the following
while incorporating the WWW::Mechanize module:
my @links = $mech->find_all_links(tag = "a", text_regex => qr/\bWORD\b/i );
try tag => 'a' you are trying to assign a value of a to tag the wa
Hi,
I'm reading/scraping hyperlinks from a specific web page using the following
while incorporating the WWW::Mechanize module:
my @links = $mech->find_all_links(tag = "a", text_regex => qr/\bWORD\b/i );
When I run the program, I get an error: 'Can't modify constant item in
scalar assignment at
Hi all,
I have a problem with the GD module on Solaris 5.8 using Perl 5.6.1. I have installed
Perl to /usr/local/bin/perl and /usr/app/perl is a symlink to fit in with certain
conventions round here.
When compiling the GD module it asked me where libgd was installed, and I told it -
/usr/loca
my openconf function contains:
sub openconf {
my $pkg = shift;
my $self = bless([EMAIL PROTECTED],$pkg);
open(...
return($self);
}
I have "my @config;" set at the beggining of the module
-
This mail is from: <[EMAIL PROTECTED]>
> Hi,
> I'm trying to create library that can open many config files. For
> examlpe, I have cfg1.conf and cfg2.conf. My lib is getting information
> from those files and store it into an array. If I do:
>
> my $cfg1 = My::Lib->openconf("cfg1.conf");
> my $cfg2 = My::Lib->openconf("cfg2.conf");
>
> Hi,
>
> I am using Net::Telnet and getting a new shell on a remote machine
> all my commands work fine
> Now suppose I become root using "su" and "pass" I am not able to
> execute commands on this root shell
> Can anyone show me How I can do this
>
I believe you are going to need to use th
Hi,
I'm trying to create library that can open many config files. For
examlpe, I have cfg1.conf and cfg2.conf. My lib is getting information
from those files and store it into an array. If I do:
my $cfg1 = My::Lib->openconf("cfg1.conf");
my $cfg2 = My::Lib->openconf("cfg2.conf");
print $cfg1->par
> -Original Message-
> From: Alok Bhatt [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 11:49 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: DBD for SQL Server?
>
>
>
> --- Richard Crawford <[EMAIL PROTECTED]>
> wrote:
> > Is there a DBD for SQL Server so that
--- Richard Crawford <[EMAIL PROTECTED]>
wrote:
> Is there a DBD for SQL Server so that I can connect
> to our SQL Server
> 2000 database with DBI? I've hunted all over CPAN
> but I can't seem to
> find one.
Windows uses the Open Database Connectivity (ODBC)
Model. You can connect to an MS-SQL
On Wed, 2004-05-12 at 02:18, Joseph Ruffino wrote:
> Hi,
>
> I have a question that maybe someone can help me with. I am
> writing/creating a file on a unix server, and I check to see if the file
> exists before I create it. If it does create a new file, I want to send
> the previous file via
Jan Eden wrote:
>
> Hi all,
>
> there must be a better way to do this. My task is to create a multiple choice
> test in HTML. First, I print the question (frage):
>
> my $query = "SELECT frage_id, frage_text, antwort_text_1, antwort_text_2,
> antwort_text_3, antwort_text_4, ant
> -Original Message-
> From: Richard Crawford [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 12, 2004 12:40 AM
> To: [EMAIL PROTECTED]
> Subject: DBD for SQL Server?
>
>
> Is there a DBD for SQL Server so that I can connect to our SQL Server
> 2000 database with DBI? I've hunted all
Hi,
I have a question that maybe someone can help me with. I am
writing/creating a file on a unix server, and I check to see if the file
exists before I create it. If it does create a new file, I want to send
the previous file via e-mail to a specific person.
I currently have it working for
I run a homegrown SMTP daemon written in Perl, on Redhat 7.3.
Lately, emails sent from some clients are received in duplicates. The
clients either run Communigate Pro, or IPlanet, MDaemon, all running
some versions of Windows.
The emails duplicate because the client sends it multiple times. The
ca
48 matches
Mail list logo