encoding script

2005-01-12 Thread Saurabh Singhvi
HI all, i want to write a perl script in linux that would get the file names in the directory i am running it in and then execute a system command for each file.(the encoding line). how should i go about it?? thnx in adv Saurabh PS:- i think i would be using syscall but i am confused about the

Re: Write stdout to a file as well as stdout

2005-01-12 Thread Ing. Branislav Gerzo
Larry Guest [LG], on Tuesday, January 11, 2005 at 15:40 (-0800) contributed this to our collective wisdom: LG I have a script that does all kinds stuff. LG When its running it outputs all kinds of useful information to the LG screen and exits. LG What I want to do is have this also sent to a

Re: Execute a perl array

2005-01-12 Thread Tor Hildrum
On Wed, 12 Jan 2005 08:55:14 +0200, Groleo Marius [EMAIL PROTECTED] wrote: Hi list! ( as usual ) i have a simple question : how can i execute an array, knowing that it contains perl code? eval for @array; Example: tor% perl -e '@array = (print \hi!\n\, print \hello\n\); eval for @array' hi!

Re: Memory full

2005-01-12 Thread Octavian Rasnita
Hi, Here is an example of a program and a perl module that parses a .xls file and eats the whole memory. I have tried it under Linux and Windows and it has the same problem under both OSs, so it has big bugs. I have tried using that destructor class in the perl module but I think what I have

RE: Execute a perl array

2005-01-12 Thread Thomas Bätzler
Groleo Marius [EMAIL PROTECTED] asked: i have a simple question : how can i execute an array, knowing that it contains perl code? Assuming you meant a Perl script, not bytecode: eval join(\n,@code); Read all about it with perldoc -f eval. HTH, Thomas -- To unsubscribe, e-mail:

Break a loop in Netware's PERL

2005-01-12 Thread GMane Python
Hello all I'm absolutely new to PERL -- actually, I'm using it for exactly 1 project I'm mostly through. On Netware's v5.8 of PERL, I have basically a loop, a while 1==1 { stuff }. On Netware, I can't break out of this with CTRL-C. CTRL-D, etc. I'd like to put a check inside the loop to see

Re: encoding script

2005-01-12 Thread JupiterHost.Net
Saurabh Singhvi wrote: HI all, Hello, i want to write a perl script in linux that would get the file names in the directory i am running it in and then execute a system command for each file.(the encoding line). how should i go about it?? perl -mstrict -we 'for(`ls`) { chomp;print `grep foo $_`;

Re: encoding script

2005-01-12 Thread Wiggins d Anconia
Saurabh Singhvi wrote: HI all, Hello, i want to write a perl script in linux that would get the file names in the directory i am running it in and then execute a system command for each file.(the encoding line). how should i go about it?? perl -mstrict -we 'for(`ls`) {

RE: encoding script

2005-01-12 Thread McBride, Dennis
I found this snippet of code in the PERL for system administration book last week while I was reading it. opendir(DIR,.) or die Can't open the current directory: $!\n; @names = readdir(DIR) or die Unable to read current dir:$!\n; closedir(DIR); foreach $name (@names) { # do stuff here } I hope

Re: Memory full

2005-01-12 Thread Dave Gray
Here is an example of a program and a perl module that parses a .xls file and eats the whole memory. I have tried it under Linux and Windows and it has the same problem under both OSs, so it has big bugs. [snip] #Insert into database my $rapoarte_i = $dbh-prepare(insert ignore into

Re: Execute a perl array

2005-01-12 Thread mgoland
- Original Message - From: Groleo Marius [EMAIL PROTECTED] Date: Wednesday, January 12, 2005 1:55 am Subject: Execute a perl array Hi list! ( as usual ) Hello i have a simple question : how can i execute an array, knowing that it contains perl code? Just thought of a beter

Re: encoding script

2005-01-12 Thread JupiterHost.Net
perl -mstrict -we 'for(`ls`) { chomp;print `grep foo $_`; }' Yikes, please don't shell out for this, and please don't suggest newbies should shell out for these calls. If you are going to write shell, why not just write shell. Your script is completely insufficient in terms of error handling,

Re: Memory full

2005-01-12 Thread Jay
On Wed, 12 Jan 2005 12:24:00 +0200, Octavian Rasnita [EMAIL PROTECTED] wrote: The program: use lib .; use strict; use Parse; my $f = Parse-new; opendir(DIR, .); my @files = readdir DIR; closedir DIR; foreach my $file(@files) { next unless $file =~ /\.xls$/i; $f-parse($file);

Re: Getting the prefered language of the browser

2005-01-12 Thread Lawrence Statton
Hi all, Does anyone know if there is a perl module that gets the prefered languages of the browser in their preference order? I know to get them from $ENV{HTTP_ACCEPT_LANGUAGE} environment variable, but I don't know how to parse correctly that string. I have tried reading the RFC which

Using LWP to Browse a Perl Page

2005-01-12 Thread Dan Armstrong
I've been reading this list every day for a week or so, and it's a great resource. I'm trying to use a GET or POST command to click on a link at this address: http://ibihost1.com/nycdoh/web/html/rii.pl As you can see, the address points to a Perl script. When you click on a button on this page,

Crypt SSLeay

2005-01-12 Thread Tham, Philip
I did a build on the latest version of perl. However the library Crypt::SSLeay is not present. Any idea how do I build this library? It is required for https requests. Philip -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Break a loop in Netware's PERL

2005-01-12 Thread John W. Krahn
GMane Python wrote: Hello all Hello, I'm absolutely new to PERL -- actually, I'm using it for exactly 1 project I'm mostly through. On Netware's v5.8 of PERL, I have basically a loop, a while 1==1 { stuff }. On Netware, I can't break out of this with CTRL-C. CTRL-D, etc. I'd like to put a

Re: Crypt SSLeay

2005-01-12 Thread JupiterHost.Net
Tham, Philip wrote: I did a build on the latest version of perl. However the library Crypt::SSLeay is not present. Any idea how do I build this library? It its not a library its a module :) perl -MCPAN -e 'install Crypt::SSLeay;' -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: encoding script

2005-01-12 Thread John W. Krahn
Saurabh Singhvi wrote: HI all, Hello, i want to write a perl script in linux that would get the file names in the directory i am running it in and then execute a system command for each file.(the encoding line). how should i go about it?? Something like this should work: #!/usr/bin/perl use

Re: Using LWP to Browse a Perl Page

2005-01-12 Thread mgoland
- Original Message - From: Dan Armstrong [EMAIL PROTECTED] Date: Wednesday, January 12, 2005 1:20 pm Subject: Using LWP to Browse a Perl Page I've been reading this list every day for a week or so, and it's a great resource. I'm trying to use a GET or POST command to click on a

Re: Crypt SSLeay

2005-01-12 Thread Wiggins d Anconia
I did a build on the latest version of perl. However the library Crypt::SSLeay is not present. Any idea how do I build this library? It is required for https requests. Philip The documentation for the module includes installation tips,

Re: Using LWP to Browse a Perl Page

2005-01-12 Thread Todd W
Dan Armstrong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've been reading this list every day for a week or so, and it's a great resource. I'm trying to use a GET or POST command to click on a link at this address: http://ibihost1.com/nycdoh/web/html/rii.pl As you can see,

Re: Using LWP to Browse a Perl Page

2005-01-12 Thread Wiggins d Anconia
I've been reading this list every day for a week or so, and it's a great resource. I'm trying to use a GET or POST command to click on a link at this address: http://ibihost1.com/nycdoh/web/html/rii.pl As you can see, the address points to a Perl script. When you click on a button on

RE: Using LWP to Browse a Perl Page

2005-01-12 Thread Tham, Philip
On running the command install Crypt::SSLeay I found that the scripts require a c compiler to be installed. gcc is currently installed so I created a symbolic called cc which points to /usr/local/bin/gcc. However on going a build I am still getting the following error: cc -c

Re: Execute a perl array

2005-01-12 Thread Chris Devers
On Wed, 12 Jan 2005 [EMAIL PROTECTED] wrote: Just thought of a better question, how can you check if perl code is valid with out executing it [ I guess the question may be, can you interpelate with out executing ] ?? The tools for answering this yourself are in your hands: Try: $ perl

Re: encoding script

2005-01-12 Thread Chris Devers
On Wed, 12 Jan 2005, JupiterHost.Net wrote: Saurabh Singhvi wrote: HI all, Hello, i want to write a perl script in linux that would get the file names in the directory i am running it in and then execute a system command for each file.(the encoding line). how should i go about it??

Re: Break a loop in Netware's PERL

2005-01-12 Thread Chris Devers
On Wed, 12 Jan 2005, John W. Krahn wrote: GMane Python wrote: I'm absolutely new to PERL -- actually, I'm using it for exactly 1 project I'm mostly through. On Netware's v5.8 of PERL, I have basically a loop, a while 1==1 { stuff }. On Netware, I can't break out of this with

RE: Crypt SSLeay

2005-01-12 Thread Tham, Philip
I faced two problems: 1. The build assumes that cc is the default compiler in the system. I have gcc 2. I created a link from gcc to cc to fixed the above. This time it is rejecting some of the compile options like -KPIC and -x03 and -xdepend. It seems these options are supported by gcc. How can

Image Creation: labels

2005-01-12 Thread Daniel Kasak
Hi all. I'm hunting for a method of creating labels under Linux. I've already looked at everything on freshmeat.net that came up when I searched for 'labels'. None of them cut it. Requirements: - Coloured, rotated ( 90 degrees ) text rendering - Coloured rectangle rendering That's it. You'd

Re: Image Creation: labels

2005-01-12 Thread Randy W. Sims
Daniel Kasak wrote: Hi all. I'm hunting for a method of creating labels under Linux. I've already looked at everything on freshmeat.net that came up when I searched for 'labels'. None of them cut it. Requirements: - Coloured, rotated ( 90 degrees ) text rendering - Coloured rectangle rendering

Re: Execute a perl array

2005-01-12 Thread mgoland
- Original Message - From: Chris Devers [EMAIL PROTECTED] Date: Wednesday, January 12, 2005 7:54 pm Subject: Re: Execute a perl array On Wed, 12 Jan 2005 [EMAIL PROTECTED] wrote: Just thought of a better question, how can you check if perl code is valid with out executing it [

Transforming a space-separated string to an array for words.

2005-01-12 Thread Harold Castro
Good day, This would be quick and simple. I need to write a script that will prompt the user(using STDIN) to enter a series of numbers separated by white space and then push each of those numbers into an array and then do anything such as sorting it from highest to lowest. I've tried doing it

Transforming a space-separated string to an array for words.

2005-01-12 Thread Harold Castro
Good day, This would be quick and simple. I need to write a script that will prompt the user(using STDIN) to enter a series of numbers separated by white space and then push each of those numbers into an array and then do anything such as sorting it from highest to lowest. I've tried doing it

Re: Transforming a space-separated string to an array for words.

2005-01-12 Thread Robin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 13 Jan 2005 20:02, Harold Castro wrote: my $numbers = STDIN; my @array = $numbers; Amend to: my @array = split(/ /,$numbers); This will split up the string based on the pattern (in this case, a single space. You may want to change that to

problem with extracting line

2005-01-12 Thread Anish Kumar K.
Hi I have text file in which I have the below mentioned lines This is a test start-first First Line testing end-first How are you Finally start-second Tested end-second I have a perl file which reads the above file and stores in the variable say $message