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/\/,$line; . I tried
to
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 this:
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 unsubscribe, e-mail:
Try using:
my @lines = IN;
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
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 -
Another way:
foreach $line (IN)
{
...
}
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
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 =
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 reported it.
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
Omega == Omega -1911 [EMAIL PROTECTED] writes:
Omega On 10/18/06, Robert Hicks [EMAIL PROTECTED] wrote:
I have this as an option field:
option value=5Business Objects Support/option
Is the value what gets passed back? In this case 5?
Omega The associated *name* and *value* are passed
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
?xml version=1.0
-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
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 reported it.
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:
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.
And I already replied ENOTABUG as promised ;-)
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 inside heavy
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
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
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
tried to
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.
Rob
No,
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 'our' and
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
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
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 two times - first as
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]
http://learn.perl.org/
--- 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.
Andrew
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 commands,
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 file_1
match
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
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
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) {
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);
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
--- 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:
##
require LWP::UserAgent;
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
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
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
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 =
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
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
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
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 both,
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 at
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 shop
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
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 used it that way its
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
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?
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 =
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.
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=~
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.
ssh
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 like
53 matches
Mail list logo