Re: Opening .dat file in perl

2006-10-20 Thread Ken Foskey
On Fri, 2006-10-20 at 18:11 +0200, Goksie wrote: > Thanks all for the past help > > Can someone advice me on how i can open .dat file in perl script? > > The sample of the file is as attached. > > please, i need help on it. $ file 00016367.DAT 00016367.DAT: MPEG ADTS, layer I, v1, Monaural You

Re: Switching from FTP to SCP processing

2006-10-20 Thread Ken Foskey
On Fri, 2006-10-20 at 10:56 -0700, Wagner, David --- Senior Programmer > > From my understanding of scp, one has login rights to the remote > machine and you login and work from there. At this point, I am lost in > how one would handle what I am doing now using this new method of > processing. ss

Re: regular expression syntax

2006-10-20 Thread Tom Phoenix
On 10/20/06, Kathryn Bushley <[EMAIL PROTECTED]> wrote: I'm trying to get this program to work and it works up until the last two lines (substitution) which gives a syntax error...any idea what might be the problem? What *is* the error message? $line=~ s/(.*)$code([/D])/$1$id_global{$code

Re: Re: need help for regxp

2006-10-20 Thread Tom Phoenix
On 10/20/06, Rob Dixon <[EMAIL PROTECTED]> wrote: regexes can only match character patterns and can't make decisions based on the numerical value of part of a string. That's misleading; matching character patterns *allows* one to make decisions based on the numerical value of part of a string.

regular expression syntax

2006-10-20 Thread Kathryn Bushley
Hi, I'm trying to get this program to work and it works up until the last two lines (substitution) which gives a syntax error...any idea what might be the problem? thanks, kathryn #!/usr/bin/perl -w use warnings; use Bio::Seq; use Bio::SeqIO; #initialize id and fasta files my $codefile = $A

Re: need help for regxp

2006-10-20 Thread John W. Krahn
chen li wrote: > Hi folks, Hello, > I have a folder containing a child folder and other > files. I want to print out the BMDC4-2.001 to > BMDC4-2.024 only and the file format is (string/number > or mix).number. Which regular expression is used to do > the job? /\ABMDC4-2\.0(?:0[1-9]|1[0-9]|2[0

Re: need help for regxp

2006-10-20 Thread Rob Dixon
chen li wrote: Hi folks, I have a folder containing a child folder and other files. I want to print out the BMDC4-2.001 to BMDC4-2.024 only and the file format is (string/number or mix).number. Which regular expression is used to do the job? Thanks, Li contents in the folder folder

Re: Opening .dat file in perl

2006-10-20 Thread John W. Krahn
Goke Aruna wrote: > On 10/20/06, John W. Krahn <[EMAIL PROTECTED]> wrote: >> >> Goksie wrote: >> > Thanks all for the past help >> > >> > Can someone advice me on how i can open .dat file in perl script? >> >> open my $fh, '<', '00016367.DAT' or die "Cannot open '00016367.DAT' $!"; > > Each time i

need help for regxp

2006-10-20 Thread chen li
Hi folks, I have a folder containing a child folder and other files. I want to print out the BMDC4-2.001 to BMDC4-2.024 only and the file format is (string/number or mix).number. Which regular expression is used to do the job? Thanks, Li contents in the folder folderx Analysis-1.wsp B

Re: Opening .dat file in perl

2006-10-20 Thread Goke Aruna
On 10/20/06, John W. Krahn <[EMAIL PROTECTED]> wrote: Goksie wrote: > Thanks all for the past help > > Can someone advice me on how i can open .dat file in perl script? open my $fh, '<', '00016367.DAT' or die "Cannot open '00016367.DAT' $!"; John -- Perl isn't a toolbox, but a small machine

Re: Opening .dat file in perl

2006-10-20 Thread John W. Krahn
Goksie wrote: > Thanks all for the past help > > Can someone advice me on how i can open .dat file in perl script? open my $fh, '<', '00016367.DAT' or die "Cannot open '00016367.DAT' $!"; John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools

Re: reading a file

2006-10-20 Thread Anshul Saxena
Hi add this line before your code $/ = "\n"; What this does is breaks your file reading sequence at every new line so that each new line is stored as a separate item in the array you are using. Lemme know if this helps or doesn't. On 10/19/06, Gerald Host <[EMAIL PROTECTED]> wrote: I tried bo

Opening .dat file in perl

2006-10-20 Thread Goksie
Thanks all for the past help Can someone advice me on how i can open .dat file in perl script? The sample of the file is as attached. please, i need help on it. goksie > ÿÿÿ

Switching from FTP to SCP processing

2006-10-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I found out this week that within our organization, FTP will be no longer allowed and that in its place, scp ( secure copy over SSH ) will take it's place. I have a couple of polling modules which use FTP to look for trigger files in specific locations on remote machines. I then ftp the dat

Re: tracing "Subroutine ** redefined at " warnings

2006-10-20 Thread Tom Phoenix
On 10/20/06, Ramprasad A Padmanabhan <[EMAIL PROTECTED]> wrote: I am getting warnings like ( when I run perl -wc ) Subroutine foo redefined at bar.pm. I am sure these functions are not redefined anywhere. Perl is sure that they are. It's more likely to be correct than you are. The error mes

Re: Question about Installed Packages

2006-10-20 Thread Rob Dixon
Chris Share wrote: Rob Dixon wrote: Chris Share wrote: I'm trying to implement the following code: ## require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('http://search.cpan.

Re: Where are These Carriage Returns Coming From?

2006-10-20 Thread Mumia W.
On 10/20/2006 05:35 AM, Xavier Noria wrote: On Oct 20, 2006, at 11:54 AM, Chris Share wrote: In the output of the following code there's a carriage return between the $name variable and the "!". Where is this coming from? Doesn't the chomp get rid of this? [...] Looks like CGI.pm puts STDIN

Re: RREAD CONSECUTIVE LINES

2006-10-20 Thread Mumia W.
On 10/20/2006 07:16 AM, Luba Pardo wrote: Dear all, I am trying to write a script that reads in two or three consecutive lines to process those. [...] Do you want to show some sample data? Do you want to show what the input data is supposed to look like and what the output is supposed to look

Re: tracing "Subroutine ** redefined at " warnings

2006-10-20 Thread Mumia W.
On 10/20/2006 06:35 AM, Ramprasad A Padmanabhan wrote: I am getting warnings like ( when I run perl -wc ) Subroutine foo redefined at bar.pm. I am sure these functions are not redefined anywhere. I would like to trace the source of these warnings. How do I do this. BTW I am using perl 5.8.3

Re: Question about Installed Packages

2006-10-20 Thread Derek B. Smith
--- Chris Share <[EMAIL PROTECTED]> wrote: > Thanks for the info. Isn't this what the Perl > Package Manager is for? > > Rob Dixon wrote: > > Chris Share wrote: > > > >> I'm trying to implement the following code: > >> > >> > ## > >> > >> requ

Re: Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Tom Phoenix
On 10/20/06, Rob Dixon <[EMAIL PROTECTED]> wrote: So an error has been optimised in, and what is worse is that it does it without a squeak of a warning; If you want to issue a warning to the programmer who intentionally causes this to happen, submit a patch. But the documentation is warning en

Re: Question about Installed Packages

2006-10-20 Thread Chris Share
Thanks for the info. Isn't this what the Perl Package Manager is for? Rob Dixon wrote: Chris Share wrote: I'm trying to implement the following code: ## require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_pr

Re: Question about Installed Packages

2006-10-20 Thread Rob Dixon
Chris Share wrote: I'm trying to implement the following code: ## require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('http://search.cpan.org/'); if ($response->is_success) {

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Rob Dixon
Paul Johnson wrote: On Fri, Oct 20, 2006 at 12:23:57PM +0100, Rob Dixon wrote: Paul Johnson wrote: On Fri, Oct 20, 2006 at 10:56:09AM +0200, Dr.Ruud wrote: Norbert Preining schreef: Dr.Ruud: $ perl -wle ' $a = 3; $b = 0 + (++$a) + ($a++); print "b=$b\n"; ' b=8 :) Nup, this is not the s

Question about Installed Packages

2006-10-20 Thread Chris Share
I'm trying to implement the following code: ## require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('http://search.cpan.org/'); if ($response->is_success) { print $response

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > It showed that there is a bug. I already reported it. And I already replied ENOTABUG as promised ;-) It's clear what the language should be doing in this situation and it isn't doing it, so it's broken. It's only not a bug in the sense that it's documented to be brok

Re: read consecutive lines

2006-10-20 Thread D. Bolliger
Luba Pardo [offlist]: > D. Bolliger am Freitag, 20. Oktober 2006 15:00: > > Luba Pardo am Freitag, 20. Oktober 2006 14:16: > > > Dear all, > > > > Hello > > > > > I am trying to write a script that reads in two or three consecutive > > > lines to process those. For example that if the first line of

Re: Website down?

2006-10-20 Thread Mathew
Mathew wrote: > I'm trying to get onto the beginners.perl.org website so I can change my > email address but it keeps hanging at about halfway. Is it down? > > Mathew > > Nevermind, it was just wicked slow at the time. Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Derek B. Smith
--- Paul Johnson <[EMAIL PROTECTED]> wrote: > On Fri, Oct 20, 2006 at 08:11:36AM -0500, > [EMAIL PROTECTED] wrote: > > > Computer software consists of only two > components: ones and > > zeros, in roughly equal proportions. All that is > required is to > > sort them into the correct order

Website down?

2006-10-20 Thread Mathew
I'm trying to get onto the beginners.perl.org website so I can change my email address but it keeps hanging at about halfway. Is it down? Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Dynamical our/my/local

2006-10-20 Thread Randal L. Schwartz
> ""Oleg" == "Oleg V Volkov" <[EMAIL PROTECTED]> writes: "Oleg> I'm using a simple Getopt::* / Alias::attr like function to parse "Oleg> named parameters from hash and assign them to localized variables "Oleg> to save me some dereferencing inside heavy loops, but declaring "Oleg> parameters tw

Re: Dynamical our/my/local

2006-10-20 Thread Dr.Ruud
"Oleg V. Volkov" schreef: > Is there a way to do something to effect of: > our ${$varname}; > > I'm using a simple Getopt::* / Alias::attr like function to parse > named parameters from hash and assign them to localized variables > to save me some dereferencing inside heavy loops, but declaring >

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Paul Johnson
On Fri, Oct 20, 2006 at 08:11:36AM -0500, [EMAIL PROTECTED] wrote: > Computer software consists of only two components: ones and > zeros, in roughly equal proportions. All that is required is to > sort them into the correct order. Andrew Preview: You're playing all the wrong notes. Eric M

Re: Dynamical our/my/local

2006-10-20 Thread Oleg V. Volkov
"Jenda Krynicky" <[EMAIL PROTECTED]> wrote: >> Is there a way to do something to effect of: >> our ${$varname}; [skip] > Have a look at >use vars qw($list @of %variables); [skip] > I don't think you can emulate 'local' or 'my'. You should also be aware of > the different scoping of the 'o

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread lawrence
> >> It showed that there is a bug. I already reported it. > > > > And I already replied ENOTABUG as promised ;-) > > It's clear what the language should be doing in this situation and it isn't > doing it, so it's broken. It's only not a bug in the sense that it's > documented > to be broken.

Re: RREAD CONSECUTIVE LINES

2006-10-20 Thread D. Bolliger
Luba Pardo am Freitag, 20. Oktober 2006 14:16: > Dear all, Hello > I am trying to write a script that reads in two or three consecutive lines > to process those. For example that if the first line of file_1 match with > an scalar from a file_2, then print the lines 2 and 3 of the file_1. I > trie

RREAD CONSECUTIVE LINES

2006-10-20 Thread Luba Pardo
Dear all, I am trying to write a script that reads in two or three consecutive lines to process those. For example that if the first line of file_1 match with an scalar from a file_2, then print the lines 2 and 3 of the file_1. I tried to save everything in a array, but the file is extremely large

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Paul Johnson
On Fri, Oct 20, 2006 at 12:23:57PM +0100, Rob Dixon wrote: > Paul Johnson wrote: > > > >On Fri, Oct 20, 2006 at 10:56:09AM +0200, Dr.Ruud wrote: > > > >>Norbert Preining schreef: > >>> > >>>Dr.Ruud: > > $ perl -wle ' > $a = 3; > $b = 0 + (++$a) + ($a++); > print "b=$b\n"

Re: Dynamical our/my/local

2006-10-20 Thread Jenda Krynicky
From: "Oleg V. Volkov" <[EMAIL PROTECTED]> > Greetings. > > Is there a way to do something to effect of: > our ${$varname}; > > I'm using a simple Getopt::* / Alias::attr like function to parse > named parameters from hash and assign them to localized variables to > save me some dereferencing ins

Re: Where are These Carriage Returns Coming From?

2006-10-20 Thread Chris Share
Krishnakumar K P wrote: -Original Message- From: Chris Share [mailto:[EMAIL PROTECTED] Sent: Friday, October 20, 2006 3:24 PM To: beginners@perl.org Subject: Where are These Carriage Returns Coming From? Hi, In the output of the following code there's a carriage return between the

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Dr.Ruud
Paul Johnson schreef: > Dr.Ruud: >> Norbert Preining: >>> Dr.Ruud: $ perl -wle ' $a = 3; $b = 0 + (++$a) + ($a++); print "b=$b\n"; ' b=8 :) >>> >>> Nup, this is not the solution: >> >> Solution? >> >> It showed that there is a bug. I already reported it. >

tracing "Subroutine ** redefined at " warnings

2006-10-20 Thread Ramprasad A Padmanabhan
I am getting warnings like ( when I run perl -wc ) Subroutine foo redefined at bar.pm. I am sure these functions are not redefined anywhere. I would like to trace the source of these warnings. How do I do this. BTW I am using perl 5.8.3 on linux Thanks Ram -- To unsubscribe, e-mail: [EMAIL

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Rob Dixon
Paul Johnson wrote: > On Fri, Oct 20, 2006 at 10:56:09AM +0200, Dr.Ruud wrote: Norbert Preining schreef: >>> Dr.Ruud: $ perl -wle ' $a = 3; $b = 0 + (++$a) + ($a++); print "b=$b\n"; ' b=8 :) Nup, this is not the solution: Solution? It showed that there is a bug. I already repo

RE: Where are These Carriage Returns Coming From?

2006-10-20 Thread Krishnakumar K P
-Original Message- From: Chris Share [mailto:[EMAIL PROTECTED] Sent: Friday, October 20, 2006 3:24 PM To: beginners@perl.org Subject: Where are These Carriage Returns Coming From? Hi, In the output of the following code there's a carriage return between the $name variable and the "!

RE: Where are These Carriage Returns Coming From?

2006-10-20 Thread bou, hou \(GE Money, consultant\)
under is the result of the source. chomp $name; just delete the CR/LF of the row What is your name? peng CR/LF What is your name? peng Content-Type: text/html; charset=ISO-8859-1 http://www.w3.org/TR/xht

Re: HTML Form question

2006-10-20 Thread Randal L. Schwartz
> ""Omega" == "Omega -1911" <[EMAIL PROTECTED]> writes: "Omega> On 10/18/06, Robert Hicks <[EMAIL PROTECTED]> wrote: >> I have this as an option field: >> >> Business Objects Support >> >> Is the "value" what gets passed back? In this case "5"? >> "Omega> The associated *name* and *value*

Re: Where are These Carriage Returns Coming From?

2006-10-20 Thread Xavier Noria
On Oct 20, 2006, at 11:54 AM, Chris Share wrote: In the output of the following code there's a carriage return between the $name variable and the "!". Where is this coming from? Doesn't the chomp get rid of this? #!/usr/local/bin/perl $| = 1; use strict; use warnings; use CGI qw(:standar

Re: Where are These Carriage Returns Coming From?

2006-10-20 Thread Chris Share
Sorry, I don't get it. Could you elaborate? bou, hou (GE Money, consultant) wrote: under is the result of the source. chomp $name; just delete the CR/LF of the row What is your name? peng CR/LF What is

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Paul Johnson
On Fri, Oct 20, 2006 at 10:56:09AM +0200, Dr.Ruud wrote: > Norbert Preining schreef: > > Dr.Ruud: > > >> $ perl -wle ' > >> $a = 3; > >> $b = 0 + (++$a) + ($a++); > >> print "b=$b\n"; > >> ' > >> b=8 > >> :) > > > > Nup, this is not the solution: > > Solution? > > It showed that there i

Where are These Carriage Returns Coming From?

2006-10-20 Thread Chris Share
Hi, In the output of the following code there's a carriage return between the $name variable and the "!". Where is this coming from? Doesn't the chomp get rid of this? #!/usr/local/bin/perl $| = 1; use strict; use warnings; use CGI qw(:standard); print "What is your name? "; my $name = ;

RE: reading a file

2006-10-20 Thread Helliwell, Kim
Another way: foreach $line () { ... } if you don't want to slurp all the lines into an array (to save memory). Kim Helliwell LSI Logic Corporation Work: 408 433 8475 Cell: 408 832 5365 [EMAIL PROTECTED] Please Note: My email address will change to [EMAIL PROTECTED] on Oct 14. The old 'lsil.com

Dynamical our/my/local

2006-10-20 Thread Oleg V. Volkov
Greetings. Is there a way to do something to effect of: our ${$varname}; I'm using a simple Getopt::* / Alias::attr like function to parse named parameters from hash and assign them to localized variables to save me some dereferencing inside heavy loops, but declaring parameters two times - first

RE: reading a file

2006-10-20 Thread Helliwell, Kim
Try using: my @lines = ; I don't think you need the split, and it's goofing things up. I know the above works, because I use it all the time. Kim Helliwell LSI Logic Corporation Work: 408 433 8475 Cell: 408 832 5365 [EMAIL PROTECTED] Please Note: My email address will change to [EMAIL PROTECTE

Re: Evaluation of ++ different in C and perl?

2006-10-20 Thread Dr.Ruud
Norbert Preining schreef: > Dr.Ruud: >> $ perl -wle ' >> $a = 3; >> $b = 0 + (++$a) + ($a++); >> print "b=$b\n"; >> ' >> b=8 >> :) > > Nup, this is not the solution: Solution? It showed that there is a bug. I already reported it. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubs

Re: simultaneous delimiters

2006-10-20 Thread John W. Krahn
Luba Pardo wrote: > Dear all: Hello, > I wonder if it is possible to split a line with more than one delimiter at > the same time. > I have a file which delimiter is < and >, but if I only split by either < > or > I got a new line, which I do not need. > > the sentece I have is something like t

simultaneous delimiters

2006-10-20 Thread Luba Pardo
Dear all: I wonder if it is possible to split a line with more than one delimiter at the same time. I have a file which delimiter is < and >, but if I only split by either < or > I got a new line, which I do not need. the sentece I have is something like this: @a1_s=split/\