Pedro Antonio Reche wrote:
>
> Hi, I am interested in parsing the file at the bottom of this e-mail in
> order to extract the string between "" following /product=,
> /protein_id=, /db_xref= and /translation=, and that for each of the
> segment separated by the string "CDS". The ouptput for the
ActiveState docs suggest you can:
perl -pi '.orig' -e 's/bar/baz/' fileAto specify the .orig suffix but
That did not work for me.
perl -pi.bak -e 's/bar/baz/' fileA does! Thanks John
"John W. Krahn" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dave K wrot
Hi, I am interested in parsing the file at the bottom of this e-mail in
order to extract the string between "" following /product=,
/protein_id=, /db_xref= and /translation=, and that for each of the
segment separated by the string "CDS". The ouptput for the example
bellow should look like this:
vim and vi are da bomb, lol. OK, had to put that in there :). Just remember
if you have to recover your system vi is the way. But emacs is ok, it makes
a great OS :P
On Tue, 17 Dec 2002 14:20:00 -0500
Wiggins d'Anconia <[EMAIL PROTECTED]> wrote:
>
> > (don't be too hard on vi -- a very good edit
eval may be what you want. Check out:
perldoc -f eval
Or you might have to pass a -M or a 'require' statement to
your perl -e line, if I am understanding at all correctly.
http://danconia.org
Dan Muey wrote:
I have a need to get perl code from a database into a variabole and then execute it.
I
(don't be too hard on vi -- a very good editor! ) (try vim or gvim for a
more friendly interface).
Vim rules ;-)... so much for preventing a flame war.
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Did a perl -V on my system and "uselargefile=undef"So, this is what I am
going to do. I will re-compile perl with uselargefile option and see how it
works.
Thanks again
Adnan Olia
"Adnan Olia" <[EMAIL PROTECTED]> wrote in message
ato5rr$24p$[EMAIL PROTECTED]">news:ato5rr$24p$[EMAIL PROTECTED
Christopher J Bottaro wrote:
>
> On Tuesday 17 December 2002 04:38 am, Paul Johnson wrote:
> > I think Perl actually made me a better C programmer, but it is sometimes
> > frustrating going down to the level of C. Keep your hand in with XS
> > programming :-)
>
> what is XS programming?
perldoc
Dave K wrote:
>
> perl -pi -e 's/foo/bar/' my_file.txt
> is supposed to do an inplace edit of my_file.txt, looping over each line,
> replacing foo with bar. Instead it merely stomps my_file.txt, effectively
> erasing it. Any body know why?
> Perl for cygwin, WinNt is the environment.
Yes, thi
On Tue, Dec 17, 2002 at 03:44:45PM -0600, Adnan Olia wrote:
> I am trying to get the size of the file using the stat function in Perl
> 5.6.0. The actual size of the file is greater than 5 GB on Mandrake Linux
> 8.2 (kernel 2.4) using ext2 filesystem. When I run the stat command, the
> value of
JLW,
perl -pi -e 's/foo/bar/' my_file.txt
is supposed to do an inplace edit of my_file.txt, looping over each line,
replacing foo with bar. Instead it merely stomps my_file.txt, effectively
erasing it. Any body know why?
Perl for cygwin, WinNt is the environment.
David
"Jeff Westman" <[EMAIL PR
Must be a stat limitation then. I've never heard of that but I've never looked either.
Does anyone know of such a limitation?
What is the exact code you're using?
-Original Message-
From: Adnan Olia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 4:30 PM
To: Dan Muey
Subject
Anybody know of any modules or ways to execute a variable that contains perl code as
if it were part of the script?
IE do : print `/usr/bin/perl -e '$code_here'`;
Except be able to use variables/arrays/hashes/routines that are in the script with
that line
EG : print `/usr/bin/perl -e '$code_h
> -Original Message-
> From: Jeff Westman [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, December 15, 2002 2:20 PM
> To: [EMAIL PROTECTED]
> Subject: Read-Write Mode Not Working
>
>
> Hi,
>
> I'm using ActivePerl 5.6.1. I am trying to update an existing file.
> According to perlfaq5.pod,
Hi,
I am trying to get the size of the file using the stat function in Perl
5.6.0. The actual size of the file is greater than 5 GB on Mandrake Linux
8.2 (kernel 2.4) using ext2 filesystem. When I run the stat command, the
value of the size is 0, this is also true for all values of the stat
func
On Tuesday 17 December 2002 04:38 am, Paul Johnson wrote:
> I think Perl actually made me a better C programmer, but it is sometimes
> frustrating going down to the level of C. Keep your hand in with XS
> programming :-)
what is XS programming?
> Yes. And occassionally even if there isn't. Per
FWIW:
I have been using CodeWright (www.starbase.com), but have recently become
enamored with Jedit -- written in Java, open source, supports Perl mode,
very extensible I'm still trying to make it "fit" me, but the difficulty
lies in me, not in the editor. (www.jedit.org).
Codewright is a ve
I got a priveate response to this posting, that may answer my original
question about using the mode "+<".
"I knew I ran into this before, just could not remember where. From the
docs (perlfunc open):
*
You can't usually use either read-write mode for updating tex
On Tue, 17 Dec 2002, Paul Kraus wrote:
> What editors do you guys use when coding Perl? I have been using emacs
> on both windows and Linux but that is because I hate vi and notepad.
I prefer Crimson Editor (http://www.crimsoneditor.com)
and HTML-Kit on windows.
For /(Li|U)nix/, I use emacs.
G
www.editplus.com
This is one neat kid. You can even ask it to execute your perl programs when you setup
some custom controls.
Check it out
Pritpal Dhaliwal
-Original Message-
From: Paul Kraus [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 12:05 PM
To: 'Perl'
Su
What editors do you guys use when coding Perl? I have been using emacs
on both windows and Linux but that is because I hate vi and notepad.
Paul Kraus
Network Administrator
PEL Supply Company
216.267.5775 Voice
216-267-6176 Fax
www.pelsupply.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
vi, emacs, xedit. Just make sure it is not a word processing package
(i.e., Word, WordPerfect, etc).
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
> What editors do you guys use when coding Perl? I have been using emacs
> on both windows and Linux but that is because I hate vi and notepad.
>
> Paul Kraus
> Network Administrator
> PEL Supply Company
> 216.267.5775 Voice
> 216-267-6176 Fax
> www.pelsupply.com
Then use emacs.
they all work. D
Yes, I am having the same problem. I don't write much scripts (I'm a newbie)
but when I do, open() doesn't seem to work. I'm pretty sure it has to work
on Windows, but...
--
Bob Erinkveld (Webmaster Insane Hosts)
www.insane-hosts.net
MSN: [EMAIL PROTECTED]
From: Jeff Westman <[EM
Change your line to
foreach my $group ( `ls -d1 "$source/0*/*"`)
In this instance the spaces in the path serve as a parameter separator to
the ls command. You must therefore delimit the parameter with additional
quotes.
Cheers,
Rob
- Original Message -
From: "Johnson, Shaunn" <[E
Shaunn
You should have no need of the additional quotation marks in your strings.
The spaces are unambiguous in this context.
my $dest='/i/Depression Management/Mailing/test_dir';
my $source='/i/Depression Management/Mailing/Dec2002';
Cheers,
Rob
- Original Message -
From: "Jo
Pam
Something like this should work, as long as the date in the record is
irrelevant and you want to include the full path to the file as its name.
#!/usr/bin/perl -w
our %file = ();
get_data();
print "$_: $file{$_}\n" foreach (keys %file);
#get data, split into date, and u
can you send me the entire script again. already deleted the first one
> -Original Message-
> From: Johnson, Shaunn [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 12:46 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: names with spaces
>
>
> --i've tried that, but, this is the
--i've tried that, but, this is the results from that:
[snip]
/i/Depression Management/Mailing/test/03
/i/Depression Management/Mailing/test/04
/i/Depression Management/Mailing/test/05
/i/Depression Management/Mailing/test/06
ls: /i/Depression: No such file or directory*** this is breaking **
>
> The problem is, the first step is to create a sub-directory
> in a path that have spaces in the names.
>
> I thought I fixed it, but, it seems that the script
> fails one way or the other (building the sub-directory
> or the creation of the files).
>
> Can someone tell me why this is not work
INLINE
> -Original Message-
> From: Johnson, Shaunn [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 12:26 PM
> To: '[EMAIL PROTECTED]'
> Subject: names with spaces
>
>
> Howdy:
>
> I thought that this worked, but, I have a script where
> I try to get a list of file names
Howdy:
I thought that this worked, but, I have a script where
I try to get a list of file names that have spaces
and do something with those files (in this example,
I'm making ISO images out of them).
The problem is, the first step is to create a sub-directory
in a path that have spaces in the na
why not just read the files and add the text to an array.
key:Filename, value count.
then increment count.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 12:22 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re:
> Can anyone help?
>
> I have created a Perl script that takes customer information from our
> database and prints it to a file called test.xml.
> I need to get this file to another company so that they can update
> their database with the information as they have managed to lose it rm
> * (who kno
> my final goal is to loop through each filename and count how many times
> each filename appears, example: archive/summer.html 2
> arts.html 2
> arttherapy.html 3.
>
>
> for right now, I'm just trying to loop through the array @url.
> Next step would be to compare whats in $line with what's in $ur
>> On Tue, 17 Dec 2002 11:59:46, <[EMAIL PROTECTED]> said:
> Also, you might change 'scalar(@url)' to '$#url' for simplicity.
More than just simplicity:
void:chris~ % perl -le '@a=(5,10,15,20); print scalar @a,"\n",$#a'
4
3
$# signifies the index of the last element in an arr
> -Original Message-
> From: Ken Lehman [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 11:52 AM
> To: '[EMAIL PROTECTED]'
> Subject: catch kill -9 from unix command prompt
>
>
> Is there a way for my program to execute a few lines of code
> before dying
> when it is sent a
Thanks for your help. Could some one tell me where I could find some
good examples on how to use Win32-DriveInfo?
Thomas Browner
Digidyne, Inc
Technical Engineer
(251)479-1637
-Original Message-
From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 10:41 AM
my final goal is to loop through each filename and count how many times each filename
appears, example:
archive/summer.html 2
arts.html 2
arttherapy.html 3.
for right now, I'm just trying to loop through the array @url.
Next step would be to compare whats in $line with what's in $url[$i] and if
Can anyone help?
I have created a Perl script that takes customer information from our
database and prints it to a file called test.xml.
I need to get this file to another company so that they can update
their database with the information as they have managed to lose it
rm * (who knows).
Can an
use sigtrap 'handler' => &sig_handler, KILL;
&sig_handler{
#your clean up code you want executed
}
sigtrap can be found on cpan, there are more ways to use it... Documented
there.
SrA Jensen
-Original Message-
From: Ken Lehman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2
> Howdy,
>
> why isn't $i incrementing?
> >24for ($i=0; $i<$num; $i++){
>25 print ("$i = $url[$i]\n");
>26}
>27
It's working perfectly! :)
21$num = scalar(@url);
22print ("num = $num\n");
output:
num = 1
0 = archive
Yes, yes, yes
Adding
$smtp->datasend ("From: $From\n")
did it!
Thank you so much
At 01:45 PM 12/17/2002 +, Rob Dixon wrote:
Hi Robert
I'm guessing to a large extent here, but RFC821 says
>>
Notice that the forward-path and reverse-path appear in the SMTP commands
and repli
Is there a way for my program to execute a few lines of code before dying
when it is sent a kill -9 from a unix shell? The book I have says no, I
don't want to ignore the signal, just some clean up.
Thanks.
-Ken
-
I have a need to get perl code from a database into a variabole and then execute it.
I can get it to work no problem if I'm just printing, or do my own vars and routines (
EG : $input contains $var = 1; and sub mon { print $var; } &mon; it wil print 1 )
But I can't use variables and subroutines th
http://jenda.krynicky.cz/perl/CPAN&ppm.html
He, I just got them from Google :
http://www.google.be/search?q=install+perl+nmake&ie=UTF-8&oe=UTF-8&hl=nl&meta=
José.
> -Original Message-
> From: Thomas Browner [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 5:17 PM
> To: [EM
http://home.san.rr.com/lanois/perl/2706_01.html
José.
> -Original Message-
> From: Thomas Browner [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 5:17 PM
> To: [EMAIL PROTECTED]
> Subject: FW: remote hard drive stat
>
>
> How do I go about installing the Win32-Dri
How do I go about installing the Win32-DriveInfo in perl under windows
since there are no ppm packages?
Thomas Browner
Digidyne, Inc
Technical Engineer
(251)479-1637
-Original Message-
From: Nigel Peck - MIS Web Design [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 3:42 PM
T
Gary Lindgren wrote:
Here's a program I wrote that sends attachments.
Gary
On 12/16/02 5:53 PM, "Marcelo" <[EMAIL PROTECTED]> wrote:
Hi people ..
I'm using the Mail::Box modules to manipulate e-mail... but I still
don't know how to obtain the names of the files attached to an
e-mail...I ne
Hi Pam
$i is incrementing. Your loop starts with $i at zero, as shown by your
trace. The print statement executes, $i is incremented to 1, your test $i <
$num is made and found to be false ($i == $num) so the loop executes.
I'm not sure exactly what you're wanting. The line split(/ /, $line) will
you have told i not to increment past 0 but making $num your count. as your
print out shows, $num never gets past 1. I am not sure what you want $num to
be? do you want it to be a count of chars in the scalar string $url ? if so,
try length()
> -Original Message-
> From: Pam Derks [mailto
Howdy,
why isn't $i incrementing?
here's sample of data file containing date and filename:
021211 archive/summer.html
021211 archive/summer.html
021211 archive/tipsheet.html
021211 arts.html
021211 arts.html
021211 arttherapy.html
021211 arttherapy.html
021211 arttherapy.html
021211 award.html
02
From: Paul Johnson <[EMAIL PROTECTED]>
> On Tue, Dec 17, 2002 at 12:39:41AM -0600, christopher j bottaro wrote:
> > just that memory will stay allocated as long as there is a way to
> > reach it?
>
> Yes. And occassionally even if there isn't. Perl 5 uses reference
> counting, and so you have to
From: "David Eason" <[EMAIL PROTECTED]>
> Is there a better way to say:
>
> my @input_files = glob (join " ", @ARGV) unless $#ARGV = -1;
> foreach my $doc ( @input_files ) { ... __code goes here___ }
use G; # http://Jenda.Krynicky.cz/#G
my @input_files = @ARGV;
Jenda
= [EMAIL PROTECTED] ==
Hi Robert
I'm guessing to a large extent here, but RFC821 says
>>
Notice that the forward-path and reverse-path appear in the SMTP commands
and replies, but not necessarily in the message. That is, there is no need
for these paths and especially this syntax to appear in the "To:" , "From:",
"CC:
>>my @str_start = qw ( 1 0 28 27 34 );
>>my @str_length = qw ( 8 9 10 9 2 );
>>my @search_key = qw (FILETYPE.ZIP RBZ RBZ Bytes Errors);
>>Since search_key is used in a regular expression it might be better to
>>create one.
>>my $search_key = qr/FILETYPE.ZIP|RBZ|RBZ|Bytes|Errors/;
B
On Tue, Dec 17, 2002 at 12:39:41AM -0600, christopher j bottaro wrote:
> cool beans, thanks. wow, perl is neat, but i fear it will make me a
> bad c programmer...;)
I think Perl actually made me a better C programmer, but it is sometimes
frustrating going down to the level of C. Keep your hand
Hi all,
Found it double quotes did the trick!
Thanx anyway.
Cheers!
Wim
Wim wrote:
Hi,
I'm trying to put some data in a postgres database, but it is not so
easy as I expected
This is my code:
foreach $ipaddress (sort keys %ifipaddr) {
$ip = new NetAddr::IP "$ipaddress", "$ifnetma
Hi,
I'm trying to put some data in a postgres database, but it is not so
easy as I expected
This is my code:
foreach $ipaddress (sort keys %ifipaddr) {
$ip = new NetAddr::IP "$ipaddress",
"$ifnetmask{$ipaddress}";
$sth4 -> execute
Dear William,
Thank you for sharing this.
Rgds,
Dennis
At 05:45 AM 12/14/2002, [EMAIL PROTECTED] wrote:
The last time I attempted this, I got soo fraastrated. If you can get
perlexe to work, that is the way to go.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsub
60 matches
Mail list logo