RE: Question of memory management in Perl

2004-05-25 Thread Marcos . Rebelo
Probably you notice that you have +- 1kb for each hexa values. This seems that you have some global variables that are not necessary. Usually the solution is having the variables scoped to the minimum code area possible. Module 'strict' can help. for instance if you have something like. my @arr

Re: How to send "Net Send" messages from a Linux Server

2004-05-25 Thread Tarun Dua
Lrmk wrote: > I want to write a Perl script to send net send messages to the windows > based computers but my scripts are running on Linux computer. You can use the smbclient command on linux. echo "Message" | smbclient -M -Tarun -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comma

How to execute a Perl script in Linux??? (I havent seen linux)

2004-05-25 Thread LRMK
I have never used a computer with linux so I need a very clear answer I have a script uploaded to /home/myusername/public_html/cgi-bin/rating/rank.pl in my web host I want it to execute once a week So I am gonna use Cron Jobs I can set the timing its very simple But I dont know what is the comma

Re: How to execute a Perl script in Linux??? (I havent seen linux)

2004-05-25 Thread David Dorward
On 25 May 2004, at 10:25, LRMK wrote: I have never used a computer with linux so I need a very clear answer I have a script uploaded to /home/myusername/public_html/cgi-bin/rating/rank.pl in my web host I want it to execute once a week So I am gonna use Cron Jobs I can set the timing its very simp

RE: How to find files in subdirectory

2004-05-25 Thread LKTee
Hi, after refer the File::Find, I write the script below: #!/usr/bin/perl use warnings; use strict; use File::Find; find ( \&callback, "/") ; sub callback{ print $File::Find::name, "\n"; } but this script will list all the filename, from the disk. So, how I set the condition, only displa

Re: How to execute a Perl script in Linux??? (I havent seen linux)

2004-05-25 Thread Ramprasad A Padmanabhan
Wow, you have learnt how to set up the cron. But havent seen linux ? anyway you can run your command as perl

RE: How to find files in subdirectory

2004-05-25 Thread Jan Eden
LKTee wrote on 25.05.2004: >Hi, after refer the File::Find, I write the script below: > >#!/usr/bin/perl >use warnings; >use strict; >use File::Find; >find ( \&callback, "/") ; > >sub callback{ > print $File::Find::name, "\n"; >} > >but this script will list all the filename, from the disk. So,

Re: Modify $0 in Perl embedded in C

2004-05-25 Thread JupiterHost.Net
zentara wrote: On Fri, 21 May 2004 20:37:33 -0500, [EMAIL PROTECTED] (Jupiterhost.Net) wrote: Hello group! Maybe a bit much for a beginners list (I looked and looked and couldn't find any specific lists) but Perhaps a guru or two will know the answer :) Have you tried the perl.inline list? Th

Digest:MD5 compilation errors...

2004-05-25 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I'm trying to install Digest:MD5 2.33 on RHES 3 and getting compilation errors: perl Makefile.PL Perl's config says that U32 access must be aligned. Writing Makefile for Digest::MD5 make Makefile:85: *** missing separator. Stop. Here's a snippet of the Makefile starting with line #85: installma

RE: matrix solving

2004-05-25 Thread Wiggins d Anconia
Please bottom post > Hi, > Can some one provide an example sample on how to use it? > There is an example at the bottom of the docs for the module, http://search.cpan.org/~ulpfr/Math-Matrix-0.4/Matrix.pm#EXAMPLE http://danconia.org > Thank you & best regards, > ABC > > > -Original

Finding a string in a file

2004-05-25 Thread Debbie Cooper
I need to search for the occurrence of a string in a file that is buried in directories. So, for example, I have a directory structure that looks like this C:\data\elec\1\220\webdata.tab. The last three folders change frequently so I can have c:\data\appl\3\180\webdata.tab and so on. The file I'

Re: Finding a string in a file

2004-05-25 Thread Jan Eden
Debbie Cooper wrote on 25.05.2004: >I need to search for the occurrence of a string in a file that is >buried in directories. So, for example, I have a directory >structure that looks like this C:\data\elec\1\220\webdata.tab. The >last three folders change frequently so I can have >c:\data\appl\

Re: Finding a string in a file

2004-05-25 Thread Chris Charley
- Original Message - From: "Debbie Cooper" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: <[EMAIL PROTECTED]> Sent: Tuesday, May 25, 2004 12:11 PM Subject: Finding a string in a file > I need to search for the occurrence of a string in a file that is buried in > directories. So, fo

array population from system app call

2004-05-25 Thread DBSMITH
All, was hoping anyone could provide some syntax help. I want to populate an array from a system app call like so and then print out each element. my @ftapes = system ("evmvol -w label_state=3|grep barcode"); print $ftapes[0] or print $ftapes[0,1] The problem is it prints out all the

RE: array population from system app call

2004-05-25 Thread Halkyard, Jim
To capture output you need the backticks my @output = `put your command here`; The return value of a system call is the return value of the program you call. See perldoc perlfaq8 for more info Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 25 May 2004

Re: array population from system app call

2004-05-25 Thread James Edward Gray II
On May 25, 2004, at 12:45 PM, [EMAIL PROTECTED] wrote: All, was hoping anyone could provide some syntax help. I want to populate an array from a system app call like so and then print out each element. my @ftapes = system ("evmvol -w label_state=3|grep barcode"); print $ftapes[0]; You're lookin

RE: array population from system app call

2004-05-25 Thread DBSMITH
cool, but why doesn't my @ftapes = system ("evmvol -w label_state=3|grep barcode"); print $ftapes[0] OR print $ftapes[0,1] work? I see that it does not support multidimensional arrays, so how do I implement this using system? Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams 614-566-4145

Re: array population from system app call

2004-05-25 Thread James Edward Gray II
On May 25, 2004, at 1:03 PM, [EMAIL PROTECTED] wrote: cool, but why doesn't my @ftapes = system ("evmvol -w label_state=3|grep barcode"); print $ftapes[0] OR print $ftapes[0,1] work? Because system() does not return the program's output, it returns exit status. I see that it does not support mult

Re: array population from system app call

2004-05-25 Thread DBSMITH
excellent I did not know that about system! thanks again! Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams James Edward Gray II <[EMAIL PROTECTED]> 05/25/2004 02:08 PM To: [EMAIL PROTECTED] cc: Perl Beginners <[EMAIL PROTECTED]> Subject:Re: arra

Re: array population from system app call

2004-05-25 Thread DBSMITH
ok so now I can get all elements printed using my @ftapes = ( ); my @ftapes = `evmvol -w label_state=3|grep barcode`; foreach $_ (@ftapes) { print $_ , "\n"; } so now I want to use multidimensional arrays using print $ftapes[0,1] does pri

Re: array population from system app call

2004-05-25 Thread James Edward Gray II
On May 25, 2004, at 1:34 PM, [EMAIL PROTECTED] wrote: ok so now I can get all elements printed using my @ftapes = ( ); my @ftapes = `evmvol -w label_state=3|grep barcode`; foreach $_ (@ftapes) { print $_ , "\n"; } so now I want to use multidi

Re: array population from system app call

2004-05-25 Thread DBSMITH
here is the sample output. barcode=E01124 barcode=E01178 barcode=E01195 barcode=E01225 barcode=E01232 maybe I am not understanding when a multidimensional array would be useful? when are these references useful? Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams James Edward Gray II <

Re: array population from system app call

2004-05-25 Thread DBSMITH
here is the full output. volid= name= luname=st_9840_acs_0 slot_index=1 barcode=E01124 mtype=35 atype=0 sequence=0 mside=0 state=0 open_count=0 v_flags=0 comment= flags_value: 0x108 flags: RVM_IS_FOREIGN RVM_IS_IN_REAL_LU volid= name= luname=st_9840_acs_0 slot_in

Re: Digest:MD5 compilation errors...

2004-05-25 Thread Jenda Krynicky
From: [EMAIL PROTECTED] (PerlDiscuss - Perl Newsgroups and mailing lists) > I'm trying to install Digest:MD5 2.33 on RHES 3 and getting > compilation errors: > > perl Makefile.PL > Perl's config says that U32 access must be aligned. > Writing Makefile for Digest::MD5 > > make > Makefile:85: *** m

Re: array population from system app call

2004-05-25 Thread James Edward Gray II
On May 25, 2004, at 2:24 PM, [EMAIL PROTECTED] wrote: here is the sample output. barcode=E01124 barcode=E01178 barcode=E01195 barcode=E01225 barcode=E01232 maybe I am not understanding when a multidimensional array would be useful? when are these references useful? I really doubt you need a multid

Re: array population from system app call

2004-05-25 Thread DBSMITH
James, yes it does thanks! Will you be so kind and answer my other question too? maybe I am not understanding when a multidimensional array would be useful? when are these references useful? is there a perldoc I can read as well? Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams Jame

Re: array population from system app call

2004-05-25 Thread James Edward Gray II
On May 25, 2004, at 2:45 PM, [EMAIL PROTECTED] wrote: James, yes it does thanks! Will you be so kind and answer my other question too? Good news. Yes, I will... maybe I am not understanding when a multidimensional array would be useful? when are these references useful? is there a perldoc I can

entering text within a file

2004-05-25 Thread DBSMITH
All, I am having some trouble figuring this out. I want to enter some text within a pre-existing file. Here is what the file would look like E00140 E00141 E00143 . . . here is my code thus far #!/usr/local/bin/perl -w use strict; my $ejectapes = "/usr/local/bin/perld/exports"; open (ACSLS

Re: Finding a string in a file

2004-05-25 Thread John W. Krahn
Debbie Cooper wrote: > > I need to search for the occurrence of a string in a file that is buried in > directories. So, for example, I have a directory structure that looks like > this C:\data\elec\1\220\webdata.tab. The last three folders change > frequently so I can have c:\data\appl\3\180\web

Re: array population from system app call

2004-05-25 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > All, Hello, > was hoping anyone could provide some syntax help. > > I want to populate an array from a system app call like so and then > print out each element. > > my @ftapes = system ("evmvol -w label_state=3|grep barcode"); > print $ftapes[0] > > or > > p

Re: array population from system app call

2004-05-25 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > yes it does thanks! Will you be so kind and answer my other question too? > > maybe I am not understanding when a multidimensional array would be > useful? when are these references useful? > is there a perldoc I can read as well? perldoc perldata perldoc perllol p

Re: entering text within a file

2004-05-25 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > > All, Hello, > I am having some trouble figuring this out. I want to enter some text > within a pre-existing file. Here is what the file would look like > > E00140 > E00141 > E00143 > . > . > . > > here is my code thus far > > #!/usr/local/bin/perl -w > use stric

Re: How to execute a Perl script in Linux??? (I havent seen linux)

2004-05-25 Thread John W. Krahn
Lrmk wrote: > > I have never used a computer with linux so I need a very clear answer > I have a script uploaded to > > /home/myusername/public_html/cgi-bin/rating/rank.pl > > in my web host > > I want it to execute once a week So I am gonna use Cron Jobs I can set the > timing its very simple

Detecting the Country and other information of a IP address

2004-05-25 Thread LRMK
I want one of my scripts to process IP addreses and detect the country and other information like city, ISP, and the IP range which has the same attributes I tryied writing a script to post the IP address to regional network information center's web site's who is form and then process the resultin