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
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
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!
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
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:
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
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 $_`;
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`) {
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
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
- 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
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,
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);
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
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,
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/
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
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
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
- 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
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,
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,
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
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
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
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??
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
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
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
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
- 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 [
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
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
-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
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
35 matches
Mail list logo