so, i'm thinking i'm not understanding references here again, but here's
what i have.
i fill in my array here:
my $worksheetin = $workbookin-worksheet(0);
my ( $row_min, $row_max ) = $worksheetin-row_range();
my ( $col_min, $col_max ) = $worksheetin-col_range();
for my $row ( $row_min ..
too much freaking data. i increased my scroll buffer and found that i do get
data, just not the last 1k lines err
On Mon, Nov 15, 2010 at 12:33 PM, shawn wilson ag4ve...@gmail.com wrote:
so, i'm thinking i'm not understanding references here again, but here's
what i have.
i fill in
sw == shawn wilson ag4ve...@gmail.com writes:
swmy $worksheetout = $workbookout-add_worksheet( '$year' );
why are you quoting $year? that doesn't do what you think it does. in
fact it is a bug. you aren't checking if you get results out of that
call which is another problem.
uri
--
Uri
On Mon, Nov 15, 2010 at 1:54 PM, Uri Guttman u...@stemsystems.com wrote:
sw == shawn wilson ag4ve...@gmail.com writes:
swmy $worksheetout = $workbookout-add_worksheet( '$year' );
why are you quoting $year? that doesn't do what you think it does. in
fact it is a bug. you aren't
Thanks for the answers.
I have tried to use quotemeta but it did not work as expected, DBI's
quote function was exactly what I want.
Thanks again,
On Jul 1, 6:35 pm, [EMAIL PROTECTED] (Amit Saxena) wrote:
use
$*dbh*-*quote*($str)
On Tue, Jul 1, 2008 at 4:59 AM, Gunnar Hjalmarsson [EMAIL
use
$*dbh*-*quote*($str)
On Tue, Jul 1, 2008 at 4:59 AM, Gunnar Hjalmarsson [EMAIL PROTECTED]
wrote:
Beyza wrote:
I have an array which has strings like;
John's House
Bla bla;
etc,
When I use them in an SQL query, perl gives an error. So, I need to
put escape character for every
Hi,
I would like to know how to insert escape character in front of
special characters in an array.
I have an array which has strings like;
John's House
Bla bla;
etc,
When I use them in an SQL query, perl gives an error. So, I need to
put escape character for every special character. Is there
Beyza wrote:
Hi,
I would like to know how to insert escape character in front of
special characters in an array.
I have an array which has strings like;
John's House
Bla bla;
etc,
When I use them in an SQL query, perl gives an error. So, I need to
put escape character for every special
Beyza wrote:
Hi,
I would like to know how to insert escape character in front of
special characters in an array.
I have an array which has strings like;
John's House
Bla bla;
etc,
When I use them in an SQL query, perl gives an error. So, I need to
put escape character for every
Beyza wrote:
I have an array which has strings like;
John's House
Bla bla;
etc,
When I use them in an SQL query, perl gives an error. So, I need to
put escape character for every special character. Is there any quick
way to do it?
perldoc -f quotemeta
--
Gunnar Hjalmarsson
Email:
Is this what you wan't ?
open INPUT,$ARGV[0];
while ($line=INPUT){
push (@array,$line);
}
foreach $i(@array){
print $i;
}
Andrej Kastrin [EMAIL PROTECTED] skrev i en meddelelse
news:[EMAIL PROTECTED]
I wrote simple script, which have to concatenate multiple lines into
I wrote simple script, which have to concatenate multiple lines into
array and then print each element of tihis array:
open INPUT,$ARGV[0];
while ($line=INPUT){
push (@array,$line);
foreach $i(@array){
print $i;
}
}
Input is e.g.
line 1
line 2
I don't know where is the problem,
Andrej Kastrin [EMAIL PROTECTED] asked:
I wrote simple script, which have to concatenate multiple
lines into array and then print each element of tihis array:
open INPUT,$ARGV[0];
while ($line=INPUT){
I would instead suggest you use the special filehandle.
This automagically opens any
Mr Andrej,
I think the following code will work for u,
open INPUT,$ARGV[0];
while (INPUT){
@array=$_;
}
foreach $i(@array){
print $i;
}
Regards
Mazhar
On 1/23/06, Thomas Bätzler [EMAIL PROTECTED] wrote:
Andrej Kastrin [EMAIL PROTECTED] asked:
I wrote simple script, which have to
Andrej Kastrin am Montag, 23. Januar 2006 07.55:
I wrote simple script, which have to concatenate multiple lines into
array and then print each element of tihis array:
I don't know where is the problem, Please, help!
The basic problem is that you try to print the result within the (while)
Always group reply so others can help and be helped, and to avoid
getting accidentally ignored.
Because it's up-side down.
Why is that?
It makes replies harder to read.
Why not?
Please don't top-post. - Sherm Pendley, Mac OS X list
Aaron Huber wrote:
On 6/3/05, Wiggins d'Anconia [EMAIL
I am trying to send the output of a mysql query to a two dimensional array.
This is what I've tried using push.
while (@results = $sth-fetchrow_array ())
{
$x = $results[0];
$y = $results[1];
push (@data,[$x],[$y]);
}
However, I don't get back a two dimensional array, I get back a
:42 PM
To: beginners@perl.org
Subject: Two Dimensional Array Problem
I am trying to send the output of a mysql query to a two dimensional array.
This is what I've tried using push.
while (@results = $sth-fetchrow_array ())
{
$x = $results[0];
$y = $results[1];
push (@data,[$x],[$y
[EMAIL PROTECTED] wrote:
I am trying to send the output of a mysql query to a two dimensional
array.
This is what I've tried using push.
while (@results = $sth-fetchrow_array ())
{
$x = $results[0];
$y = $results[1];
push (@data,[$x],[$y]);
push( @data, [ $x , $y
[EMAIL PROTECTED] wrote:
I am trying to send the output of a mysql query to a two dimensional array.
This is what I've tried using push.
while (@results = $sth-fetchrow_array ())
{
$x = $results[0];
$y = $results[1];
push (@data,[$x],[$y]);
}
However, I don't get back a
: Two Dimensional Array Problem
[EMAIL PROTECTED] wrote:
I am trying to send the output of a mysql query to a two dimensional
array.
This is what I've tried using push.
while (@results = $sth-fetchrow_array ())
{
$x = $results[0];
$y = $results[1];
push (@data,[$x],[$y
in order and you are using say a hash which has array.
Wags ;)
-Original Message-
From: Wagner, David --- Senior Programmer Analyst --- WGO
[mailto:[EMAIL PROTECTED]
Sent: Friday, June 03, 2005 3:01 PM
To: [EMAIL PROTECTED]; beginners@perl.org
Subject: RE: Two Dimensional Array
[snip]
Hi Brian,
I usually deal with multidimensional arrays this way:
$i = 0;
while (@results = $sth-fetchrow_array ())
{
$x = $results[0];
$y = $results[1];
@points = ($x, $y);
$data[$i] = [EMAIL PROTECTED];
$i++;
}
Just a note about a possible problem with the statement:
Edward Wijaya wrote:
Hi groups,
Hello,
I have a file which contain many many of this line (Fasta Format):
YNL331C
CAATATGCGAGGGACCTACATGTTGA
CATGACAATGAATTCTATTGAA
YKL071W
ATAATTATTCCTGTTTCTTTAACCTG
GTGTACAAACACTTAAGC
What I would like to do is to concatenate the
John W. Krahn wrote:
This should do what you want:
$/ = '';
while ( ) {
next unless s/\s+\S.*//;
chomp;
tr/\n//d;
print $_\n;
}
After seeing your data file change that to:
$/ = '';
while ( ) {
next unless s/\S+.*\n//;
chomp;
tr/\n//d;
print $_\n;
This works:
---BEGIN CODE---
#!/usr/bin/perl
use warnings;
use strict;
$/ = '';
while (DATA) {
s/(.*?\n.*?)\n/$1/s;
print;
}
__DATA__
YNL331C
CAATATGCGAGGGACCTACATGTTGA
CATGACAATGAATTCTATTGAA
YKL071W
ATAATTATTCCTGTTTCTTTAACCTG
GTGTACAAACACTTAAGC
---END CODE---
Hi groups,
I have a file which contain many many of this line (Fasta Format):
YNL331C
CAATATGCGAGGGACCTACATGTTGA
CATGACAATGAATTCTATTGAA
YKL071W
ATAATTATTCCTGTTTCTTTAACCTG
GTGTACAAACACTTAAGC
What I would like to do is to concatenate the line below
into one single string.
Such as the
);
next;
}
chomp;
$line .= $_;
}
shift @crseq;
print join(\n, @crseq), \n;
-Original Message-
From: Edward Wijaya [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 10, 2004 9:09 PM
To: [EMAIL PROTECTED]
Subject: Concatenating line into array
On Thu, 10 Jun 2004 21:19:17 -0700, Tim Johnson [EMAIL PROTECTED]
wrote:
while () {
if (/^/) {
push (@crseq, $line);
next;
}
chomp;
$line .= $_;
}
shift @crseq;
print join(\n, @crseq), \n;
From: Edward Wijaya mailto:[EMAIL PROTECTED] wrote:
: #---My Code --
: while () {
: if (/^/) {
: next;
: }
: chomp;
: $line .= $_;
: }
: push (@crseq, $line);
: print join(\n, @crseq), \n;
How about:
my @crseq;
while ( ) {
next unless/^[ACGT]/;
How about:
my @crseq;
while ( ) {
next unless/^[ACGT]/;
chomp;
push @crseq, $_ . scalar ;
}
print @crseq;
Hi Charles,
Thanks for your reply.
Your code works for my example in email, but not the file
with more lines, (please see attached file).
So sorry if I didn't give precise
From: Edward Wijaya mailto:[EMAIL PROTECTED] wrote:
:: How about:
::
:: my @crseq;
:: while ( ) {
:: next unless/^[ACGT]/;
:: chomp;
:: push @crseq, $_ . scalar ;
:: }
:: print @crseq;
::
:
: Hi Charles,
:
: Thanks for your reply.
:
: Your code works for my example in email,
0 @F1@ FAM
1 HUSB @I13@
1 WIFE @I14@
1 CHIL @I8@
0 @F2@ FAM
1 HUSB @I10@
1 WIFE @I8@
1 CHIL @I11@
1 CHIL @I12@
etc.
$/ = undef;
for (split /\n0/, ) {
($key) = /\@(..)/;
$hash{$key} = [ /\@(\w+)\@$/gm ];
}
$individuals{F1}[0] = I13;
$individuals{F1}[1] = I14;
On Mon, Nov 11, 2002 at 06:17:58PM -0500, Cacialli, Doug wrote:
I've got oodles of data. It looks like this:
0 @F1@ FAM
1 HUSB @I13@
1 WIFE @I14@
1 CHIL @I8@
0 @F2@ FAM
1 HUSB @I10@
1 WIFE @I8@
1 CHIL @I11@
1 CHIL @I12@
etc.
[ snip problem ]
I'm familiar with substr, split, m//,
Y'all,
I'm new to programming in perl, and relatively new to programming at all, so
I apologize if this is a little hard to follow.
I've got oodles of data. It looks like this:
0 @F1@ FAM
1 HUSB @I13@
1 WIFE @I14@
1 CHIL @I8@
0 @F2@ FAM
1 HUSB @I10@
1 WIFE @I8@
1 CHIL @I11@
1 CHIL @I12@
etc.
One additional thing:
The data exists in an array, where each line of raw data is a scalar string
within the array.
-Original Message-
From: Cacialli, Doug
Sent: Monday, November 11, 2002 6:18 PM
To: '[EMAIL PROTECTED]'
Subject: Array problem, I think
Y'all,
I'm new to programming
Hi, Doug, :)
On Mon, 11 Nov 2002, Cacialli, Doug wrote:
I'm new to programming in perl, and relatively new to programming at
all, so I apologize if this is a little hard to follow.
Wasn't hard at all! You described the problem very succinctly.
I've got oodles of data. It looks like this:
This solution works well and is clean, if you are curious about some of
the *magic* he is performing in his foreach I would suggest reading up
on the special variable $_ for those of us experienced in perl it isn't
as daunting to just throw a foreach (@array) in the code and know that
it is
Hi, Wiggins, :)
On Mon, 11 Nov 2002, Wiggins d'Anconia wrote:
This solution works well and is clean, if you are curious about some
of the *magic* he is performing in his foreach I would suggest
reading up on the special variable $_ for those of us experienced in
perl it isn't as daunting to
No need to apologize. Agreed.
http://danconia.org
Jason Tiller wrote:
Hi, Wiggins, :)
On Mon, 11 Nov 2002, Wiggins d'Anconia wrote:
This solution works well and is clean, if you are curious about some
of the *magic* he is performing in his foreach I would suggest
reading up on the special
Thanks so much for your help on this. I tried this suggestion, but
unfortunately, the array @indata does not seem to contain the usernames
from the file pwdata.txt.
I've been looking at this for hours. I hope someone can help me figure
out what I am missing here. The objectives for this code and
- Original Message -
From: maureen [EMAIL PROTECTED]
To: Leon [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, January 21, 2002 8:39 AM
Subject: Re: Array Problem
if ($username ne /$in{username}/)
{
Anything in between the forward slash are usually used as a regular
expression
- Original Message -
From: maureen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Currently, the array seems to only be picking up the last name listed in
the text file.
@indata = FILE;
close(FILE);
foreach $i (@indata)
{
#remove hard return character from each record
chomp($i);
Hello! I hope someone can help me.
I am working on the following code, written to accomplish these tasks:
1)Accept username and password from an HTML page
2)Open a text file and store the username and passwords listed there in
an array
3)Compare the username and password in the array to the
Hi,
I have a prob:) I need to search threw an array and remove an item based on
its name. I was thinking about maybie a for each loop but I am not sure how
to go about it. Heres what I need to do:
say $object= sword;
I have an array @AllObjects('beer', 'nuts', 'sword', 'and more stuff')
Now
--- Andre` Niel Cameron [EMAIL PROTECTED] wrote:
Hi,
I have a prob:) I need to search threw an array and remove an item based on
its name. I was thinking about maybie a for each loop but I am not sure how
to go about it. Heres what I need to do:
say $object= sword;
I have an array
46 matches
Mail list logo