On Thu, 2008-08-28 at 19:59 +0200, Laurens Vets wrote:
> Hello,
>
> >> When I log onto a linux host, and use "set" I can see that there a
> >> couple of functions defined (test() for instance) in bash. How can I
> >> read out these functions and use them in a perl script?
> >
> > You can't as
Hello,
When I log onto a linux host, and use "set" I can see that there a
couple of functions defined (test() for instance) in bash. How can I
read out these functions and use them in a perl script?
You can't as they are bash functions, not Perl functions.
There's no way to read them out l
Laurens Vets wrote:
Hi all,
Hello,
When I log onto a linux host, and use "set" I can see that there a
couple of functions defined (test() for instance) in bash. How can I
read out these functions and use them in a perl script?
You can't as they are bash functions, not Perl functions.
J
Hi all,
When I log onto a linux host, and use "set" I can see that there a
couple of functions defined (test() for instance) in bash. How can I
read out these functions and use them in a perl script?
I've search the archives, but nothing came up.
Thanks in advance!
--
To unsubscribe, e-mai
Hi all
Thanks for all the help with this, going to have some fun implementing it :)
Thanks
Pat
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On Jun 20, 1:30 pm, [EMAIL PROTECTED] (John W. Krahn) wrote:
> Here is another way to do it:
>
> my $jump;
> while ( ) {
> $jump = $. + 10 if /regex/;
> print "the output" if $jump == $.;
> }
>
Two observations:
1. this will warn while $jump is undef
2. if regex is matched by one o
> I am looking at a way of reading a line doing a regex to find the
> specific line then pick out the line, sudo code would be some thing
> like the following:
>
> read in line
> check regex
>
> if regex is correct
> {jump 10 lines
> print the output
>
> }
>
> any ideas on jumping the 10 li
Pat Rice wrote:
Hi all
Hello,
I am looking at a way of reading a line doing a regex to find the
specific line then pick out the line, sudo code would be some thing
like the following:
read in line
check regex
if regex is correct
{jump 10 lines
print the output
}
any ideas on jumpin
On Fri, Jun 20, 2008 at 8:06 AM, Pat Rice <[EMAIL PROTECTED]> wrote:
>
> Hi all
>
> I am looking at a way of reading a line doing a regex to find the
> specific line then pick out the line, sudo code would be some thing
> like the following:
>
> read in line
> check regex
>
> if regex is correct
>
On Fri, Jun 20, 2008 at 09:06, Pat Rice <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I am looking at a way of reading a line doing a regex to find the
> specific line then pick out the line, sudo code would be some thing
> like the following:
>
> read in line
> check regex
>
> if regex is correct
> {
Hi all
I am looking at a way of reading a line doing a regex to find the
specific line then pick out the line, sudo code would be some thing
like the following:
read in line
check regex
if regex is correct
{jump 10 lines
print the output
}
any ideas on jumping the 10 lines, how do I ign
macromedia wrote:
> Hi,
Hello,
> I have a file that I would like to read in then do the following:
>
> - Read in each line and remove any duplicate text with tags
> - Sort the file so all tag IDs are in sequential order
> - Save the results to a different file name.
>
> Can this be done easily?
On Wed, 21 Sep 2005, macromedia wrote:
> I have a file that I would like to read in then do the following:
>
> - Read in each line and remove any duplicate text with tags
> - Sort the file so all tag IDs are in sequential order
> - Save the results to a different file name.
>
> Can this be done
Hi,
I have a file that I would like to read in then do the following:
- Read in each line and remove any duplicate text with tags
- Sort the file so all tag IDs are in sequential order
- Save the results to a different file name.
Can this be done easily? If so, how? I'm really a newbie at this
Hi,
I have a file that I would like to read in then do the following:
- Read in each line and remove any duplicate text with tags
- Sort the file so all tag IDs are in sequential order
- Save the results to a different file name.
Can this be done easily? If so, how? I'm really a newbie at this
Hi Trina.
Trina Espinoza wrote:
> I have a file that I want to run multiple actions on. First, the file is
> read in as one long string. I want to
> substitute some words with others so I run a substitution. That seems to
> change the data in the first
> while, HOWEVER, when I run the second while
Trina Espinoza wrote:
> I have a file that I want to run multiple actions on. First, the file is
> read in as one long string. I want to
> substitute some words with others so I run a substitution. That seems to
> change the data in the first
> while, HOWEVER, when I run the second while loop on t
I have a file that I want to run multiple actions on. First, the file is
read in as one long string. I want to
substitute some words with others so I run a substitution. That seems to
change the data in the first
while, HOWEVER, when I run the second while loop on the same data to parse
my newly
On Friday, May 24, 2002, at 11:21 , Lovett, Clay wrote:
> I am having some difficulty with the following:
>
> I need to read a filename from a directory and assign the path to a
> variable
> $new so I can issue an open command;
>
> I also need to loop this and perform encrypt with pgp and the f
# Begins
loop for reading in $new,
system (`pgp `);# encrypting
to get $pgp ftping $pgp
$pgp=$_;#
and finally moving $new and $pgp
system (`ftp `);
I need to read some data from an input file. I have a regex that picks
out just numbers from the file, but I can't seem to be able get the ones
I want.
Here is the code I wrote:
open (KA, "K.a") || die #reads file "K.a"
"can't open K.a: $!";
LINE: while () { #r
t;Robert Aspinall" <[EMAIL PROTECTED]>; "C.J. Collier"
<[EMAIL PROTECTED]>; "Robert Aspinall" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 3:06 PM
Subject: Re: Reading in a loop from a socket?
> At 02:54 PM 7/6/01 -0400, Robe
At 02:54 PM 7/6/01 -0400, Robert Aspinall wrote:
>This just got odder. Looks like I'm reading the data in just fine, but it
>won't print to the screen unless I preface and suffix it with a newline.
>Any idea what could cause that?
The usual: STDOUT is fully buffered by default. Stick
$| = 1;
This just got odder. Looks like I'm reading the data in just fine, but it
won't print to the screen unless I preface and suffix it with a newline.
Any idea what could cause that?
Robert Aspinall
Support Engineer
V-ONE Corporation
[EMAIL PROTECTED]
> You might consider the following. I am tra
Hello,
I'm new to the perl beginners list, as of about 5 minutes ago. I'm having
problems reading
info from a socket. Entire lines (suffixed with a newline character) come
through fine, but anytime
the server sends a few characters without a newline, I don't recieve it. I
can read these charac
On May 8, Ga Bu said:
>I am fairly new to perl and having problems with
>pulling in multiple lines from a file so I can search
>those lines and if it has the expression I am looking
>for then I want to return to that file and search
>again for the same pattern of lines again and then
>search agai
Being a beginner myself, this might work, but someone else may have a
better solution...
$INFILE = "Your_Input_File.txt" ;
open (OUTFILE, ">Your_Output_File.txt";) or die;
open (INFILE) or die;
while ($line = )
{
chomp ($line);
if ($line =~ /(whatever expression you're looking for)/)
{
Hi everyone,
I am fairly new to perl and having problems with
pulling in multiple lines from a file so I can search
those lines and if it has the expression I am looking
for then I want to return to that file and search
again for the same pattern of lines again and then
search again for the patt
Bhattacharya"To: <[EMAIL PROTECTED]>
Subject: traversing dir tree and reading
in files
been trying to work out how to get PERL to traverse a given directory tree
looking for all files with the string _boot.js in the file name. then I want
to read each file and find all lines which start with the string "sWinReg"
and copy them in to an array with each line being places in a seperate
30 matches
Mail list logo