Re: Returning to my program after exiting vi.

2005-03-07 Thread Rathna N
You should be able to do it, by waiting for the return value. Ex: viRetValue=system("Comnnad String"); or viRetValue = ``; -- Regards, Rathna. On Sun, 6 Mar 2005 23:07:19 -0800 (PST), Harold Castro <[EMAIL PROTECTED]> wrote: > Hi, > I wrote a script with a line, > system('vi ./config.txt');

Re: Returning to my program after exiting vi.

2005-03-07 Thread Vladimir D Belousov
That's right, but you should better use my $viRetValue = system("command", "string"); In this case the command interpreter will not be used and that is more safe. Rathna N wrote: You should be able to do it, by waiting for the return value. Ex: viRetValue=system("Comnnad String"); or viRetValue =

Re: Text file too large for Perl?

2005-03-07 Thread John W. Krahn
James Marks wrote: The problem is most likely in your algorithm. Show us the code. (Oops. Replied only to Charles by accident. Reposting to the list:) Sorry. I was posting a part of the real code only to avoid posting an overly long string of code. The problem, it seemed to me, was more likel

Re: Tie::File problem (or is it just me?)

2005-03-07 Thread Hendrik Maryns
Kevin Horton schreef: At 11:08 -0800 6/3/05, John W. Krahn wrote: Hendrik Maryns wrote: Hi, Hello, I'm writing a little script for removing "rustle" from a log file from chat channels, in order to do linguistic research on them. I took the file and tied it with Tie::File, in order to easily acc

Re: Tie::File problem (or is it just me?)

2005-03-07 Thread Hendrik Maryns
John W. Krahn schreef: Hendrik Maryns wrote: Hi, Hello, I'm writing a little script for removing "rustle" from a log file from chat channels, in order to do linguistic research on them. I took the file and tied it with Tie::File, in order to easily acces it. This probably isn't all necessary

Re: Text file too large for Perl?

2005-03-07 Thread James Marks
The problem is most likely in your algorithm. Show us the code. (Oops. Replied only to Charles by accident. Reposting to the list:) Sorry. I was posting a part of the real code only to avoid posting an overly long string of code. The problem, it seemed to me, was more likely some other limita

Re: reg exp

2005-03-07 Thread John Doe
Hello Derek Am Montag, 7. März 2005 02.04 schrieb [EMAIL PROTECTED]: > greetings. > > cool beans! What perldoc has ###- -### in it? > ...marked with...?for me is not enough of an explanation. sorry. Sorry, i was just confused. The '#' sign is (at least most of the time) a comment characte

extract uniprot flatfile

2005-03-07 Thread SG Edwards
Hi, I am writing a perl program that will extract data from a UniProt (this is a protein database!) flatfile so that I can automatically put data into my PostgreSQL database. I am taking out name, protein ID number, references etc from the file. Does anyone know if there is a script available

Re: Text file too large for Perl?

2005-03-07 Thread Jenda Krynicky
From: James marks <[EMAIL PROTECTED]> > > The problem is most likely in your algorithm. Show us the code. > > Sorry. I was posting a part of the real code only to avoid posting an > overly long string of code. The problem, it seemed to me, was more > likely some other limitation than Perl sinc

Re: extract uniprot flatfile

2005-03-07 Thread Gretar Mar Hreggvidsson
Hi Have you looked at Bioperl (www.bioperl.org)? It is goldmine of tools for bioinformatics tasks. Correct me if I'm wrong but do not the Swiss-Prot and UniProt have the same dataformat? You should therefore be able to use something like: $stream = Bio::SeqIO->new(-file => $filename, -format =>

Changing the String of the file at one shot.

2005-03-07 Thread Suneel Kumar B
Hi Goodies, I have a situation where in, iam updating a file by replacing few strings in some lines with another string. While doing this, Can i have an option by which i could open a file for both read and write simultaneously, so that i could search and replace the string straight away..?? -

RE: Changing the String of the file at one shot.

2005-03-07 Thread Charles K. Clarkson
Suneel Kumar B wrote: : Hi Goodies, Wow! We're a snack food! :) : I have a situation where in, iam updating a file by replacing few : strings in some lines with another string. While doing this, Can i : have an option by which i could open a file for both read a

Re: How to PERL-ify sort -nrk1,1 -nk2,2

2005-03-07 Thread S.A. Birl
On Mar 3, John W. Krahn ([EMAIL PROTECTED]) typed: John: > But what I want to do now is reverse sort column 1 then sort the John: > hostnames/IPs in column 2. I have the correct Solaris 9 command. John: John: sub SortByIPoccurance { $IPaddr{ $b } <=> $IPaddr{ $a } || $a cmp $b } Great! Tha

RE: Hash headaches

2005-03-07 Thread Terry Poperszky
Charles and Jenda, thanks for your responses. In addition to the change that you both suggested, I had a problem with the array variable @directory in my exists test. I was testing the entire array instead of just the current cell. Charles, thanks for your suggestion on opendir, I will look into it

RE: Invocation environment detection

2005-03-07 Thread Graeme St. Clair
You could detect OS by use of something like this:- if (($^O eq 'MSWin32') or ($^O =~ /cygwin/i)) { ... # works for me And perhaps context by this:- if defined $ENV{GATEWAY_INTERFACE} { ... # untested, in my case "CGI/1.1" in CGI, else undefined And there's a variable $^V that gives you your

Re: Changing the String of the file at one shot.

2005-03-07 Thread Wiggins d'Anconia
Charles K. Clarkson wrote: Suneel Kumar B wrote: : Hi Goodies, Wow! We're a snack food! :) : I have a situation where in, iam updating a file by replacing few : strings in some lines with another string. While doing this, Can i : have an option by which i could open

Re: writting a detailed log

2005-03-07 Thread Wiggins d'Anconia
Tim Wolak wrote: All, I am writtting this script for a client that will transfer their files via SFTP and write a small log to their system. I would also like it to write a log on our server as well, other than just doing what I have, writting the date and the file transfered. What can I do to

Invalid data-time stamps

2005-03-07 Thread Bret Goodfellow
Hi all, I am attempting to list out the contents of a directory, and print the last time accessed. The data-time is not correct though. I am running this code on a Windows XP workstation. There doesn't seem to be a real easy way to get the timestamps of directories. H Here is the co

Re: Tie::File problem (or is it just me?)

2005-03-07 Thread Wiggins d'Anconia
John Doe wrote: Hi Hendrik [snip] Well, in writing this, I solved half of my problem, but one still remains: how can I remove a line? I tried with delete, as you see below, but (of course) this does not work, as $lijn is no array element. I think you also can't do it with an array (delete does no

perl.beginners Weekly list FAQ posting

2005-03-07 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

Re: Invalid data-time stamps

2005-03-07 Thread Vladimir D Belousov
Hallo! Try to change directory to "$ARGV[0]" before open: chdir($ARGV[0]) || die "Cannot change dir: $!\n"; opendir $DIRHANDLE, "./"; . And (may be) It is better to use lstat(2) instead of stat(2) ? In this case there will be correct dates of symbolic links. Bret Goodfellow wrote: Hi all, I am

Re: Tie::File problem (or is it just me?)

2005-03-07 Thread John Doe
Hi Wiggins Am Montag, 7. März 2005 17.19 schrieb Wiggins d'Anconia: > John Doe wrote: > > Hi Hendrik > > [snip] > > >>Well, in writing this, I solved half of my problem, but one still > >>remains: how can I remove a line? I tried with delete, as you see > >>below, but (of course) this does not wo

Re: Tie::File problem (or is it just me?)

2005-03-07 Thread John W. Krahn
Hendrik Maryns wrote: Kevin Horton schreef: What kind of line endings does the file have? If I recall correctly, I ran into a problem where perl did not recognize classical Macintosh line endings as ending a line. It thought the whole file was one line, until I converted the line endings to Un

Re: Tie::File problem (or is it just me?)

2005-03-07 Thread Wiggins d'Anconia
John Doe wrote: Hi Wiggins Am Montag, 7. März 2005 17.19 schrieb Wiggins d'Anconia: John Doe wrote: Hi Hendrik [snip] Well, in writing this, I solved half of my problem, but one still remains: how can I remove a line? I tried with delete, as you see below, but (of course) this does not work, as $

Re: Tie::File problem (or is it just me?)

2005-03-07 Thread John W. Krahn
Hendrik Maryns wrote: John W. Krahn schreef: You can do both in a single loop like this: tie my @bestand, 'Tie::File', $best or die "Kon het bestand niet binden: ", $!; for ( reverse 0 .. $#bestand ) { $bestand[ $_ ] =~ s{\[\d+/\d+/\d+\s\d+:\d+\]\s}{}; splice @bestand, $_, 1 if $bestand[

Re: Changing the String of the file at one shot.

2005-03-07 Thread John W. Krahn
Suneel Kumar B wrote: Hi Goodies, Hello, (Goodies???) I have a situation where in, iam updating a file by replacing few strings in some lines with another string. While doing this, Can i have an option by which i could open a file for both read and write simultaneously, so that i could search an

Re: reg exp

2005-03-07 Thread DBSMITH
is this line :>$_=~s{delete}{}; a named unary call? Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams John Doe

sessions

2005-03-07 Thread Octavian Rasnita
Hi all, I have seen that in PHP there are some functions that allow adding some field=value pairs to the QUERY_STRING, automaticly for all the links from a page and also in forms. This might be helpful when I want to add the session id to the query_string like &cgisessid=[session id]. Do you kno

Re: Invalid data-time stamps

2005-03-07 Thread John W. Krahn
Bret Goodfellow wrote: Hi all, Hello, I am attempting to list out the contents of a directory, and print the last time accessed. The data-time is not correct though. I am running this code on a Windows XP workstation. There doesn't seem to be a real easy way to get the timestamps of directories.

Re: reg exp

2005-03-07 Thread John Doe
Am Montag, 7. März 2005 19.54 schrieben Sie: > is this line > > :>$_=~s{delete}{}; > > a named unary call? Oups? It's just a bad choosen example; I should not have used a reserved word as string content (I realized it after having sent my post) Its simply a regex which deletes the first occ

LIB path question

2005-03-07 Thread James W. Thompson, II
How is the lib path set with ActiveState Perl? Can I just drop my custom *.pm files into the /site/lib or /lib folders under the ActiveState installation? -- James W. Thompson, II (New Orleans, LA) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <

Re: Tie::File problem (or is it just me?)

2005-03-07 Thread Hendrik Maryns
John W. Krahn schreef: Hendrik Maryns wrote: Kevin Horton schreef: What kind of line endings does the file have? If I recall correctly, I ran into a problem where perl did not recognize classical Macintosh line endings as ending a line. It thought the whole file was one line, until I converted

Re: LIB path question

2005-03-07 Thread John Doe
Hello James Am Montag, 7. März 2005 22.32 schrieb James W. Thompson, II: > How is the lib path set with ActiveState Perl? Sidenote - To show the predefined paths, execute from command line: perl -e 'print join "\n", @INC' > Can I just drop my custom *.pm files into the /site/lib or /lib folder

Re: LIB path question

2005-03-07 Thread James W. Thompson, II
Is there any method to more permanently modify the include path? I didn't notice any environment variables, is it stored in the registry or does ActiveState's Perl distro pull in anysort of configuration file? On Tue, 8 Mar 2005 00:42:11 +0100, John Doe <[EMAIL PROTECTED]> wrote: > Hello James >

Re: LIB path question

2005-03-07 Thread John Doe
Hi Am Dienstag, 8. März 2005 03.01 schrieb James W. Thompson, II: > > If you use your own directory, you must put a line like the following in > > your scripts to enable perl to find your modules: > > > > use lib 'path_to_your_module_dir_tree'; > > > > Is there any method to more per

Re: LIB path question

2005-03-07 Thread John Doe
Hi again Am Dienstag, 8. März 2005 03.01 schrieb James W. Thompson, II: > Is there any method to more permanently modify the include path? I > didn't notice any environment variables, is it stored in the registry > or does ActiveState's Perl distro pull in anysort of configuration > file? If no b

Re: Tie::File problem (or is it just me?)

2005-03-07 Thread Graeme St. Clair
-Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Hendrik Maryns Sent: Monday, March 07, 2005 5:58 PM To: beginners@perl.org Subject: [Released] [Contains offensive content] Re: Tie::File problem (or is it just me?) John W. Krahn schreef: > Hendrik Maryns wrote: > >> Ke

Re: LIB path question

2005-03-07 Thread Chris Devers
On Mon, 7 Mar 2005, James W. Thompson, II wrote: > Is there any method to more permanently modify the include path? Take a look at the PERL5LIB environment variable. If you have this defined in a login script on *nix systems, you can add directories to your standard @INC path. The same will p