We have an Alcatel CORBA 5620 gateway from which we have extract
information. Does anyone know of a module that would enable Perl
to
access this service?
I searched the CPAN's archive but could not find anything.
Apologies
if this is the wrong list to ask - which would be the best
Hi all,
We have an Alcatel CORBA 5620 gateway from which we have extract
information. Does anyone know of a module that would enable Perl to
access this service?
I searched the CPAN's archive but could not find anything. Apologies
if this is the wrong list to ask - which would be the best
I need to create a program which reads a file from the
LAN, and that
file is continuously updated (kind of log).
I can really suggest File::Tail - it's a BRILLIANT module.
~~
This e-mail and its contents are subject to the
Hi all,
When checking if the hash key exists, should I use defined() or just:
do_something if $hash{val}
I have done some tests and it seems there is no difference in
performance with or without defined(). When should defined() be used
then if it makes no difference?
TIA!
Hi all,
After I passed a hash ref to a subroutine, how can I see what the hash
name was? i.e.:
my %hash1 = ( one = 1, two = 2 );
check_limit(\%hash1);
sub check_limit {
my $hname = $_[0];
my $num = 0; for (keys %{$hname}) { $num++ };
print Hash: $hname has $num
After I passed a hash ref to a subroutine, how can I see
what the hash
name was? i.e.:
I don't think that's possible. Why do you need that?
Well in my case, the program builds some large hashes so I don't want
to copy them from sub to sub. So I pass the ref to a sub and some
repetative
Do you know this notation?
$hashref-{key}
Yes I know how to dereference a ref. I wanted to know if you could get
the name of a hash (in my case, but this could be applied to any data
type) from a ref:
BEGIN
%hash = ( one = 1, two = 2 );
do_sometin(\%hash);
sub do_sometin {
This is just an example of a problem I'm experiencing writing a
larger program.
my %hash1 = ( one = 1, two = 2 );
check_limit( '%hash1', \%hash1 );
sub check_limit {
my ( $hname, $href ) = @_;
my $num = keys %$href;
print Hash: $hname has $num keys\n; }
Hi all,
I have some subroutines that return information. Since the each
subroutine takes a snapshot of data on networked servers that should
be compared, I want the subroutines to execute in the shortest time
possible - I'd like to get all the subroutines running at the same
time. I thought of
// Apologies for the wonderful Oulook formatting in the last email.
I'm posting again so everyone can read it.
Hi all,
I have some subroutines that return information. Since the each
subroutine takes a snapshot of data on networked servers that should
be compared, I want the subroutines to
I'm trying to write a perl script that automates g++.
There is an if statement in the script that basically works like
this:
if there are no arguments
{
print an error message
break (end the program)
}
The last (same as break in C/Java) and next (same as continue in
C) functions
I'm also very new to Perl and wrote a long and newbyish script
that
does exactly what the Unix command sort FILENAME | uniq
does just to
see how it can be done.
How long? Because you can do that on one line in perl. :-)
Hi John (we're not worthy - Wayne's World) ;-)
I've just come
Hello all,
Is there a way you read input from a script line by line. I'd rather
parse output line by line than do: @out = `script.sh`; which seems
sloppy. Or is that the best way?
TIA
Thanks Marcos.
-Original Message-
From: marcos rebelo [mailto:[EMAIL PROTECTED]
Sent: 09 June 2005 09:48 AM
To: Tielman Koekemoer (TNE)
Cc: Perl Beginners
Subject: Re: Read output from script line by line
This way works
open(my $FH, 'script.sh |') or die ...;
while (my
Thanks Thomas.
-Original Message-
From: Thomas Bätzler [mailto:[EMAIL PROTECTED]
Sent: 09 June 2005 09:50 AM
To: 'Perl Beginners'
Cc: Tielman Koekemoer (TNE)
Subject: RE: Read output from script line by line
Tielman Koekemoer (TNE) [EMAIL PROTECTED] asked:
Is there a way you
Hey,
Hi
Within a perl script of mine, I'd like to execute a shell
command but have it sleep for a few minutes prior to doing
so. There are probably better ways but I can't think/find any
at the moment to do so, what I tried so far is shown here:
system(sleep 90 ;
Wow, I'm really confused. I'm trying to remove duplicate
lines from a marc21 text file. I have spent countless hours
searching for scripts etc.
I'm also very new to Perl and wrote a long and newbyish script that
does exactly what the Unix command sort FILENAME | uniq does just to
see how
Hi all,
Why can't I use a subscript in the angle brackets? e.g.
@files=`ls /app2/koekemtn/scripts/dbstats/test`;
chomp $files[0];
open ( $files[0] , $files[0]) || die Cannot open $files[0]\n;
while ($files[0]) {
print $_;
}
TIA
Thanks for the help. So I cannot use an array or hash in angle
brackets as file handle. I have a variable amount of files which I'd
like opened and the contents shuffled. What would be the best way to
do this as my next idea also did not work?
_BEGIN_
@files=`ls
Hi all,
I need to execute a shell command in a loop but the shell command
takes about 1 minute to complete. I want to execute the shell command
but but then continue processing. Usually I would background the
process with but this does not work as Perl waits for the process to
exit before
Thanks, I had a look at fork() and system(). I think system() would
work better in my case.
Thanks!
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]
Sent: 24 May 2005 02:34 PM
To: Tielman Koekemoer (TNE); Perl Beginners
Subject: RE: To Thread or not?
Tielman Koekemoer
:[EMAIL PROTECTED]
Sent: 19 May 2005 09:48 AM
To: Ramprasad A Padmanabhan
Cc: beginners@perl.org
Subject: Re: Emulate tail -f on file
On Thu, May 19, 2005 at 11:54:35AM +0530, Ramprasad A Padmanabhan
wrote:
use File::Tail;
On Thu, 2005-05-19 at 11:37, Tielman Koekemoer (TNE) wrote:
Hi All
Hi All,
If I wanted to monitor a file in a way that would emulate tail -f
(in the shell), how would I open the file?
open(FILE, filename |); (?)
TIA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi all,
I have tried various regular expressions to remove null or empty
values on array @array1 and create a new array @OPD01 with the values.
This, however, does not work as I still get a number of empty values
in the @OPD01 array after this processing. As you'll see I tried
various things -
$counter2 = 0;
What's that for? (never used)
Hmm yeah sorry that was supposed to be $counter = 0;
Use push() to avoid holding the current array index.
What do you mean by holding the index?
my @array1=(' ', 'a', '', 'b', \0, 'c', undef, 'd', ' ', 'e'); my
@new=grep {$_ and !/^\s+$/ and
Ah I see: use push() to add scalars/lists to arrays.
Thanks everyone for the help.
Use push() to avoid holding the current array index.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response
Thanks all for your info - VERY informative. Although I now feel the
need to say: Hang in there Charles. I'm sure not all Perl babes rate
their partners according to their scripting prowess.
All drop-dead gorgeous Perl programmers, you know who to contact...
;)
Thanks again,
Tielman
Hi All,
I apologise for the newbie question straight off - I don't have my
Camel book with me to consult.
Why does the following give me an error?:
--
#!/usr/bin/perl -w
#
# A script that gets a list of technologies that have events on
Display layer.
#
use strict;
sub q_db
Thanks Prasanna, that fixed it.
-Original Message-
From: Prasanna Kothari [mailto:[EMAIL PROTECTED]
Sent: 06 May 2005 02:26 PM
To: beginners@perl.org
Cc: Tielman Koekemoer (TNE)
Subject: Re: Calling a subroutine - strict very strict
what is param.?
If it's a variable, and not declared
Maybe I should tell you what fixed it:
The param was a string so enclosed it in single quotes.
Thanks!
-Original Message-
From: Tielman Koekemoer (TNE) [mailto:[EMAIL PROTECTED]
Sent: 06 May 2005 02:33 PM
To: [EMAIL PROTECTED]; beginners@perl.org
Subject: RE: Calling a subroutine
Hi All,
I think I'm like most people learn Perl easier when examining other
guru's scripts. Where is the best place on the net to find Perl
scripts that do everything, from doing pattern matching in arrays to
making coffee?
Right now, however, I think pattern matching in arrays is more
31 matches
Mail list logo