I try to upload a csv file to access database using perl DBI. But keep
failing.
The* number* and *type* of the field in csv file are not fixed. Might be
integer or character.
( I was able to make it if they are fixed)
---start of code
#connect
How would you do this in Ruby, then? I work in Ruby myself, and it's
generally quite simple to translate from one language to the other.
If you just want to be able to say $columns[Name] instead if $columns[5],
it's just as simple as saying
my $Name = 5;
$columns[$Name];
Or, if you hold some
I have a csv file, and iam checking for a condition like :
if (@columns=parse_csv($_))
{
#print $columns[11].__\n;
if($columns[11] =~ m/$field/i $columns[12] ge $\rating )
{
writeLog(Name: $columns[5] \n\t Rating: $columns[12]\n);
OpenCv($columns[5]);
Instead
Hi meaculpa,
On Wednesday 01 December 2010 09:25:43 meaculpa wrote:
I have a csv file, and iam checking for a condition like :
if (@columns=parse_csv($_))
{
#print $columns[11].__\n;
if($columns[11] =~ m/$field/i $columns[12] ge $\rating )
{
writeLog(Name: $columns
Hi meaculpa,
please reply to the list as I specifically requested in my signature.
On Wednesday 01 December 2010 12:10:20 meaculpa wrote:
here what i am using is it fetch the class which is given from column
11 and match with the age of students with column 12 and output the
name from column
here what i am using is it fetch the class which is given from column
11 and match with the age of students with column 12 and output the
name from column 5.
So how this code will make it work. Will be helpful if given a detaled
reply as I am new to perl and need to submit it by today.
--
To
No No, this is not an assignment and iam not a college student. I am a
professional and this is for automation using data driven. I have
experiencce in Ruby but not perl. Please help
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail:
On Dec 1, 3:27 pm, shlo...@iglu.org.il (Shlomi Fish) wrote:
Hi meaculpa,
please reply to the list as I specifically requested in my signature.
On Wednesday 01 December 2010 12:10:20 meaculpa wrote:
here what i am using is it fetch the class which is given from column
11 and match with
Hello,
I would like to parse a .csv file and write certain records into two
separate files. The program below writes the records easily into the
csvtmp.csv but the second file is only created with no records
written. I cannot see the problem here, the second file is produced
easily if the first
OUTFILE2;
close $fh;
#==
2008/11/18 Raymond Wan [EMAIL PROTECTED]:
Hi Lauri,
Lauri Nikkinen wrote:
I would like to parse a .csv file and write certain records into two
separate files. The program below writes the records easily into the
csvtmp.csv but the second
$csv_line-{'Surname'} . : .
$csv_line-{'Company'} . \n;
}
}
close OUTFILE;
close OUTFILE2;
close $fh;
#==
2008/11/18 Raymond Wan [EMAIL PROTECTED]:
Hi Lauri,
Lauri Nikkinen wrote:
I would like to parse a .csv file and write certain records into two
separate
On Tue, Nov 18, 2008 at 09:53, Lauri Nikkinen [EMAIL PROTECTED] wrote:
snip
#Read the data into an array
my @data = $fh;
snip
This will only work so long as the file can be fit into memory, and
even then, if the file is large enough, it can have a noticeable
impact on system performance. If
On Tue, Nov 18, 2008 at 10:05, Raymond Wan [EMAIL PROTECTED] wrote:
Hi Lauri,
Good to hear -- if the file is small enough to be read in entirely, that is
what I would do. If you need to add in another loop to output a third file,
then you can just add it in easily to make another pass.
Hi Chas.,
Chas. Owens wrote:
On Tue, Nov 18, 2008 at 10:05, Raymond Wan [EMAIL PROTECTED] wrote:
Hi Lauri,
Good to hear -- if the file is small enough to be read in entirely, that is
what I would do. If you need to add in another loop to output a third file,
then you can just add it in
On Tue, 2008-11-18 at 10:16 -0500, Chas. Owens wrote:
Perl closes all file handles at the end of the program, so the only
reasons to close file handles early are
1. the program doesn't end (it is a daemon)
2. you have a limited number of file handles in your environment (or
you consume an
Hello,
I would like to parse a .csv file and write certain records into two
separate files. The program below writes the records easily into the
csvtmp.csv but the second file is only created with no records
written. I cannot see the problem here, the second file is produced
easily if the first
Hi Lauri,
Lauri Nikkinen wrote:
I would like to parse a .csv file and write certain records into two
separate files. The program below writes the records easily into the
csvtmp.csv but the second file is only created with no records
written. I cannot see the problem here, the second file
Hi dear Rob and friends from the list:
Thank you very much for your great help. The code is now running flawlessly :-)
Thank you very much for your time and shared knowledge
Will try to give back a little bit of the much help received in this
great community
Kind regards
Erasmo
On
[EMAIL PROTECTED] wrote:
I have discovered that the number between square brackets [] won't be
only a one-digit number, but now it can contain an un-foreseen number
of digits, because the number inside the square brackets will grow
from 1 to several millions
As I have just stated, with a
33 34 }
and I need to tranform it in a new CSV file that starts each line with
the cluster value (the square-brackets enclosed value), followed by
its {}-bracket enclosed list values (in the same order), as is shown
below:
1,2,3,4,8,10,14
2,25,26,29,32
3,1,5,6,7,11,12,13,17,18,22
much indeed :-)
Now, my last (I hope) issue.
I got another text file in the following format:
cluster[1] = { 2 3 4 8 10 14 }
cluster[2] = { 25 26 29 32 }
cluster[3] = { 1 5 6 7 11 12 13 17 18 22 }
cluster[4] = { 9 19 21 23 24 27 28 30 31 33 34 }
and I need to tranform it in a new CSV file
Hi dear list:
Please forgive my lack of Perl credentials, but i am a complete beginner
But, and that is the problem, I do have an urgent issue and that's why
I came to perl in the very first instance
I have a CSV file, which comes in the following format:
a,b,.,.,.,.,.,.,.
b,c,d,.,.,.,.,.,.
e
On Fri, Jun 27, 2008 at 12:26 AM, Erasmo Perez [EMAIL PROTECTED] wrote:
a,b,.,.,.,.,.,.,.
b,c,d,.,.,.,.,.,.
e,f,g,h,.,.,.,.,.
i,j,k,l,m,.,.,.,.
and so on
My problem: how could I get rid of the trailing points and commas, so
the output CSV file could get following neat format (without
Hi dear Jeff:
Thank you very much for your help
Yiur script is working flawlessly
Just another question:
How could I re-write your script in order to treat the __DATA__
portion of your code as an external file ?
I happen to have the whole CSV file and I would not want to mix
directly
to have the whole CSV file and I would not want to mix
directly with it, but to reference it from the perl code
How could I accomplish that ?
Should I substitue the DATA for the name of the CSV file in the perl code ?
Thank you very much for any help
Regards
Erasmo
Replace:
while(DATA
Hi dear Yitzle:
Thank you very much for you suggestion about the sustitution of the
code, required to treat separately the CSV file (from the perl code).
It has worked flawlessly :-)
Thank you (all) very much
Regards
On 26/06/2008, yitzle [EMAIL PROTECTED] wrote:
On Thu, Jun 26, 2008 at 1:14
] = { 25 26 29 32 }
cluster[3] = { 1 5 6 7 11 12 13 17 18 22 }
cluster[4] = { 9 19 21 23 24 27 28 30 31 33 34 }
and I need to tranform it in a new CSV file that starts each line with
the cluster value (the square-brackets enclosed value), followed by
its {}-bracket enclosed list values (in the same order
file in the following format:
cluster[1] = { 2 3 4 8 10 14 }
cluster[2] = { 25 26 29 32 }
cluster[3] = { 1 5 6 7 11 12 13 17 18 22 }
cluster[4] = { 9 19 21 23 24 27 28 30 31 33 34 }
and I need to tranform it in a new CSV file that starts each line with
the cluster value (the square-brackets
in the following format:
cluster[1] = { 2 3 4 8 10 14 }
cluster[2] = { 25 26 29 32 }
cluster[3] = { 1 5 6 7 11 12 13 17 18 22 }
cluster[4] = { 9 19 21 23 24 27 28 30 31 33 34 }
and I need to tranform it in a new CSV file that starts each line with
the cluster value (the square-brackets enclosed value
On Thu, Jun 26, 2008 at 5:22 PM, [EMAIL PROTECTED] wrote:
Hi Yitzle:
Thank you very much for your suggestion:
Here is my perl file: clusters.pl
#! /usr/bin/perl
use warnings;
use strict;
while (my $line = ) {
$line = ~/cluster\[(\d)+\] = {([\d ]+)}/ or die;
my @vals = split(/+/,$1
Hi dear Yitzle:
Thank you very much for your great help :-)
Your perl code works great !
The problem was indeed from my side, since I was over-confident in the
(mis)use of blank space (a beginner sin)
But now your code works, thank to your helpful replies and I now i got
my a... neck covered
yitzle schreef:
while ( my $line = ) {
$line =~ /cluster\[(\d)+\] = {([\d ]+)}/ or die;
my @vals = split( / +/, $1 $2 );
print join(,, @vals) . \n;
}
Less strict alternative:
while () {
my @vals = /([0-9]+)/g or die;
print join(,, @vals) . \n;
}
or even:
{
Erasmo Perez wrote:
Hi dear list:
Hello,
Please forgive my lack of Perl credentials, but i am a complete beginner
But, and that is the problem, I do have an urgent issue and that's why
I came to perl in the very first instance
I have a CSV file, which comes in the following format:
a,b
] = { 2 3 4 8 10 14 }
cluster[2] = { 25 26 29 32 }
cluster[3] = { 1 5 6 7 11 12 13 17 18 22 }
cluster[4] = { 9 19 21 23 24 27 28 30 31 33 34 }
and I need to tranform it in a new CSV file that starts each line with
the cluster value (the square-brackets enclosed value), followed by
its {}-bracket enclosed
suyog_linux schreef:
I am new to perl coding and I am working with a CSV file where I have
to remove all the double quotes () from the first line of the file.
I need a code that I can embed in a .pl file. Could somebody help me
with this ?
Consider Text::CSV_XS
--
Affijn, Ruud
Gewoon
Hi All,
I am new to perl coding and I am working with a CSV file where I have
to remove all the double quotes () from the first line of the file.
I need a code that I can embed in a .pl file. Could somebody help me
with this ?
Thanks,
Suyog
--
To unsubscribe, e-mail: [EMAIL PROTECTED
2008/6/17 suyog_linux [EMAIL PROTECTED]:
Hi All,
Hi,
I am new to perl coding and I am working with a CSV file where I have
to remove all the double quotes () from the first line of the file.
Could you send us what you've tried so far. It works better if we can
see what you've tried and point
}++;
}
foreach my $key (keys %has)
{
print $key is $has{$key} times\n;
}
On 5/6/08, Anirban Adhikary [EMAIL PROTECTED] wrote:
Dear list
I have a csv file having the following contents.
col1 col2 col3
A, 1,2
B,1, 3
C,2,4
D,1,5
A,1,6
B,2,7
C,2,8
,3,9
Now I want to implement a logic
Dear list
I have a csv file having the following contents.
col1 col2 col3
A, 1,2
B,1, 3
C,2,4
D,1,5
A,1,6
B,2,7
C,2,8
,3,9
Now I want to implement a logic which will show me the summarize records as
follows
col1 count
A- 2
B - 2
C - 2
D - 1
and one more question how the null value
I'm sure someone more experienced will have a far more elegant
solution, but something along these lines might work.
(Note: code untested)
%count;
while () {
if ($_ =~ /^([^]*)/) {
%count{$1}++;
}
}
for (keys %count) {
print $_ - $count{$_}\n;
}
or, refractored,
%count;
while () {
Anirban Adhikary wrote:
I have a csv file having the following contents.
col1 col2 col3
A, 1,2
B,1, 3
C,2,4
D,1,5
A,1,6
B,2,7
C,2,8
,3,9
Now I want to implement a logic which will show me the summarize records as
follows
col1 count
A- 2
B - 2
C - 2
D - 1
my %cnt;
/^(\w
moved
to the next line and remained, flashing without the [...] prefix. I
pressed crtl c and looked at the file using mc. The result was that my
csv file was totally emptied of content, i.e. became an empty file.
So I went to search for the text::csv module. I tried to check if this
was installed
to the next line and remained, flashing without the [...] prefix. I
pressed crtl c and looked at the file using mc. The result was that my
csv file was totally emptied of content, i.e. became an empty file.
At this point you could have restored the original file by moving the
back-up file
e-letter wrote:
Readers,
I have a csv file (greater than 256 columns hence unable to open in
spreadsheet) of the following format:
column header1, column header2, column header3
1,0.0e0,0.0e0,5e-6
2,0.0e0,0.0e0,6e-7
3,0.0e0,0.0e0,0.0e0
I want to perform: if column headerx contains
Readers,
I have a csv file (greater than 256 columns hence unable to open in
spreadsheet) of the following format:
column header1, column header2, column header3
1,0.0e0,0.0e0,5e-6
2,0.0e0,0.0e0,6e-7
3,0.0e0,0.0e0,0.0e0
I want to perform: if column headerx contains only values of 0.0e0,
delete
e-letter wrote:
I have a csv file (greater than 256 columns hence unable to open in
spreadsheet) of the following format:
column header1, column header2, column header3
1,0.0e0,0.0e0,5e-6
2,0.0e0,0.0e0,6e-7
3,0.0e0,0.0e0,0.0e0
I want to perform: if column headerx contains only values
e-letter wrote:
Readers,
Hello,
I have a csv file (greater than 256 columns hence unable to open in
spreadsheet) of the following format:
column header1, column header2, column header3
1,0.0e0,0.0e0,5e-6
2,0.0e0,0.0e0,6e-7
3,0.0e0,0.0e0,0.0e0
I want to perform: if column headerx contains
John W. Krahn wrote:
e-letter wrote:
Readers,
Hello,
I have a csv file (greater than 256 columns hence unable to open in
spreadsheet) of the following format:
column header1, column header2, column header3
1,0.0e0,0.0e0,5e-6
2,0.0e0,0.0e0,6e-7
3,0.0e0,0.0e0,0.0e0
I want to perform
There is a report that is generated from a script as a plain text file. I need
to take this output file as input for my script and join them and create a CSV
file and mail to me daily. How can I create CSV file with out using modules.
Taking a sample report
Hostname IP address
On Fri, 2007-09-21 at 15:50 +0500, [EMAIL PROTECTED] wrote:
There is a report that is generated from a script as a plain text file. I
need to take this output file as input for my script and join them and create
a CSV file and mail to me daily. How can I create CSV file with out using
(',', map { s///g; qq($_) } @fields), \n;
snip
Also I need to bold the header in my CSV.
snip
CSV is a plain text format, there is no way to bold anything. If you
are using the CSV file solely to get the data into MS Excel and you
want to be able to control the style of the document then HTML
On 9/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
There is a report that is generated from a script as a plain text file. I
need to take this output file as input for my script and join them and create
a CSV file and mail to me daily. How can I create CSV file with out using
modules
Ken Foskey wrote:
On Fri, 2007-09-21 at 15:50 +0500, [EMAIL PROTECTED] wrote:
There is a report that is generated from a script as a plain text file. I need to take this output file as input for my script and join them and create a CSV file and mail to me daily. How can I create CSV file
Hi,
On running the script I get the following errors:
Scalar found where operator expected at ./csv_auslesen.pl line 29, near
pint Auftrag $Datenfelder
(Might be a runaway multi-line string starting on line 3)
(Do you need to predeclare pint?)
Backslash found where operator expected
open(CSV,Kalkulation_Tauchsportportal.csv) || die CSV-Datei nicht
gefunden\; you have \ your
-Original Message-
From: Ruprecht Helms [mailto:[EMAIL PROTECTED]
Sent: 19 September 2007 10:40
To: Chas Owens
Cc: Jonathan Lang; beginners@perl.org
Subject: Re: parsing csv-file for inserting
@Datenfelder = split(/,,,$Felder);
Guessing this line.
Split (//,$string)
-Original Message-
From: Ruprecht Helms [mailto:[EMAIL PROTECTED]
Sent: 19 September 2007 15:00
To: Andrew Curry
Cc: Chas Owens; Jonathan Lang; beginners@perl.org
Subject: Re: parsing csv-file for inserting
Andrew Curry wrote:
open(CSV,Kalkulation_Tauchsportportal.csv) || die CSV-Datei nicht
gefunden\; you have \ your
Ok I corrected it, now I only have an syntax-error in line 25
(split-command). In addition i am told that the part is not terminated.
The actual code is:
#!/usr/bin/perl
Auftrag.
$i++;
}
}
close (Auftrag);
print $Anzahl, Datensaetze geschrieben\n;
Your code is better written as
#!/usr/bin/perl
use strict;
use warnings;
my $file = Kalkulation_Tauchsportportal.csv;
open my $csv, '', $file
or die could not open ${file}:$!\n
Chas Owens wrote:
On 9/19/07, Ruprecht Helms [EMAIL PROTECTED] wrote:
#!/usr/bin/perl
First off, you should use the strict and warnings pragmas. So the
first two lines after the $! should be
use strict;
use warnings;
...
I inserted the two commands and get now these errors.
Scalar
On 9/19/07, Ruprecht Helms [EMAIL PROTECTED] wrote:
Chas Owens wrote:
On 9/19/07, Ruprecht Helms [EMAIL PROTECTED] wrote:
#!/usr/bin/perl
First off, you should use the strict and warnings pragmas. So the
first two lines after the $! should be
use strict;
use warnings;
...
I
On 9/16/07, Ruprecht Helms [EMAIL PROTECTED] wrote:
Hi,
how can I parse a csv-file where the entries are seperated with | .
The scripts later should put them into a mysql-database using dbi.
Especially for me is interessting how to parse the content of the file
and store them
Ruprecht Helms wrote:
Hi,
how can I parse a csv-file where the entries are seperated with | .
The scripts later should put them into a mysql-database using dbi.
Especially for me is interessting how to parse the content of the file
and store them into different variables for later
On 9/17/07, Jonathan Lang [EMAIL PROTECTED] wrote:
snip
Most of the replies have suggested using 'split( /\|/, $line )'.
However, this ignores a potentially important aspect of common cvs
file formats - well, important to me, anyway - which is the
interaction between quotes, field delimiters,
On Mon, 2007-09-17 at 13:34 -0700, Jonathan Lang wrote:
Most of the replies have suggested using 'split( /\|/, $line )'.
However, this ignores a potentially important aspect of common cvs
file formats - well, important to me, anyway - which is the
interaction between quotes, field delimiters,
Hi,
how can I parse a csv-file where the entries are seperated with | .
The scripts later should put them into a mysql-database using dbi.
Especially for me is interessting how to parse the content of the file
and store them into different variables for later processing.
A scriptexample would
On Sun, 2007-09-16 at 12:28 +0200, Ruprecht Helms wrote:
Hi,
how can I parse a csv-file where the entries are seperated with | .
The scripts later should put them into a mysql-database using dbi.
if it just splitting:
@data = split( /\|/, $line );
If you forget the backslash
Hi Ken,
how can I parse a csv-file where the entries are seperated with | .
The scripts later should put them into a mysql-database using dbi.
if it just splitting:
@data = split( /\|/, $line );
I see you are working with array. The using of the for each-loop must be
possible
have a working
example of inserting, deleting and substituting data
in cells?
In the doc it states:
$dbh-do(UPDATE $table SET id = 3 WHERE id = 1);
and
$dbh-do(DELETE FROM $table WHERE id 1);
Would $table be the name of the csv file?
thank you
be the name of the csv file?
That is the default behavior, however ...
$dbh-{'csv_tables'}-{'SomeName'} = { 'file' =
'SomeName20070827.csv'};
# tie the table name to the filename
... here you can see they are mapping a table SomeName to the file
SomeName20070827.csv
--
Lawrence
);
and
$dbh-do(DELETE FROM $table WHERE id 1);
Would $table be the name of the csv file?
Lawrence
Thank you for replying but since I am trying to learn
your response did not help much. :(
Any add'l help?
Anyway here is what I have tried:
#!/usr/bin/perl
use strict;
use warnings
On 8/28/07, oryann9 [EMAIL PROTECTED] wrote:
snip
Thank you for replying but since I am trying to learn
your response did not help much. :(
Any add'l help?
snip
#!/usr/bin/perl
use strict;
use warnings;
use DBI;
my $dbh = DBI-connect(
'DBI:CSV:f_dir=csvdb', #the directory csvdb in
From: Mihir Kamdar [EMAIL PROTECTED]
I have a csv file. I wanted to do some calculations on some of its fields,
like multiplying the 7th field with the 13th field and overwriting the 13th
field with the answer of my calculation.
Regarding this, can I do the calculations on the input file
Hi,
I have a csv file. I wanted to do some calculations on some of its fields,
like multiplying the 7th field with the 13th field and overwriting the 13th
field with the answer of my calculation.
Regarding this, can I do the calculations on the input file and overwrite it
after calculating, or I
On 8/24/07, Jeff Pang [EMAIL PROTECTED] wrote:
2007/8/24, Mihir Kamdar [EMAIL PROTECTED]:
$cdr[13] = $cdr[6]*5 ; ###Can I do something like this
sure,why can't?
Hi,
Please look at my code below and comment. I am trying to manipulate 13th
field of my record. But I am not getting
2007/8/24, Mihir Kamdar [EMAIL PROTECTED]:
$cdr[13] = $cdr[6]*5 ; ###Can I do something like this
sure,why can't?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
a csv file. I wanted to do some calculations on some of its fields,
like multiplying the 7th field with the 13th field and overwriting the
13th
field with the answer of my calculation.
Regarding this, can I do the calculations on the input file and overwrite
it
after calculating, or I
Of course it is
Your %hash gets filled with a structure that looks like this:
{ KEY = VALUE }
{ @cdr[2,3,6,7]= $line}
Then you take all the values and write them out to a file. Since you never
changed the $line variable you should get the same result in your out file
as you
2007/8/24, Mihir Kamdar [EMAIL PROTECTED]:
$cdr[13] = $cdr[6]*5 ;
$hash{@cdr[2,3,6,7]}=$line;
Hello,
I checked the codes,but I'm not sure what's the meanings of those 2 lines above.
I can't see the logic relation with the 2 lines.
Hi,
Thanks...i got my mistake...it worked after the below as Rob suggested:-
my @cdr=split (/,/, $line) ;
$cdr[13] = $cdr[6]*5.0 ;
$line = join(,,@cdr);
$hash{@cdr[2,3,6,7]}=$line;
But a few
2007/8/24, Mihir Kamdar [EMAIL PROTECTED]:
But a few improvizations. $cdr[13] that I am trying to manipulate is a
amount field and should be a floating point value...how can I print it as
floating point in perl?
Perl isn't a strong type language,it doesn't mind which data type it used.
You
Perl isn't a strong type language,it doesn't mind which data type it used.
You can use printf() for printing a floating vlaue,like,
$ perl -e 'printf(%.2f,3)'
3.00
that's right, but with respect to this particular code of mine, the $cdr[13]
is the amount field which should be a float. I am
2007/8/24, Mihir Kamdar [EMAIL PROTECTED]:
Here if I want the $cdr[13] to be written as a float(ex. 15.00), then how do
I write it?
$cdr[13] = sprintf %.2f, $cdr[6]*5.0 ;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
On 8/14/07, Lawrence Statton [EMAIL PROTECTED] wrote:
Can anybody help me how to convert csv file to excel file using Perl
or Shell scripts?
I would use Text::CSV_XS to read the CSV file and
SpreadSheet::WriteExcel to produce the Excel file.
snip
In addition to the fine modules you
Hi Friends,
Can anybody help me how to convert csv file to excel file using Perl
or Shell scripts?
Regards,
KS
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Can anybody help me how to convert csv file to excel file using Perl
or Shell scripts?
I would use Text::CSV_XS to read the CSV file and
SpreadSheet::WriteExcel to produce the Excel file.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
Hei friends,
i'am new in newbie in Perl, and i try i convert a excel file in csv
file in Suse 10.0 linux.
I install the Spreadsheet-ParseExcel-0.32.tar.gz module in my linux
but when i try run this script :
use strict;
use Spreadsheet::ParseExcel;
my $excel = Spreadsheet::ParseExcel
On 8/9/07, Santana [EMAIL PROTECTED] wrote:
snip
I install the Spreadsheet-ParseExcel-0.32.tar.gz module in my linux
but when i try run this script :
snip
I have a error something like this :
Can´t locate Spreadsheet.pm in @INC(@INC constains :
snip
Chances are good you did not
On Aug 9, 3:22 am, [EMAIL PROTECTED] (Santana) wrote:
Hei friends,
i'am new in newbie in Perl, and i try i convert a excel file in csv
file in Suse 10.0 linux.
(1)
I install the Spreadsheet-ParseExcel-0.32.tar.gz module in my linux
(2)
use Spreadsheet::ParseExcel;
(3)
I have a error
I am trying to calculate column averages (excluding 0's) for all the
columns in a CSV file except the first column. My input CSV file is
as follows:
pickcpua.dat
IMAGINGNY,1.45,0.42,1.54,1.49,1.47,1.36,1.81,0.47,1.8,0.55,0.38
JBSQLTST,1.29,1.09,1.13,1.88,1.11,1.44,1.25,1.23,1.05,1.39,1.61
is not required at
all!
Bhargav.
-Original Message-
From: country [mailto:[EMAIL PROTECTED]
Sent: Friday, August 10, 2007 12:45 AM
To: beginners@perl.org
Subject: Calculating Column Averages from a CSV File
I am trying to calculate column averages (excluding 0's) for all the
columns
There is a module on CPAN called Spreadsheet::WriteExcel you can use to
read xls data.
-Original Message-
From: Santana [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 07, 2007 8:22 AM
To: beginners@perl.org
Subject: How i convert a excel file to csv file ?
Hei friends,
i'am new
, August 07, 2007 07:29
To: Santana; beginners@perl.org
Subject: RE: How i convert a excel file to csv file ?
There is a module on CPAN called Spreadsheet::WriteExcel you
can use to
read xls data.
-Original Message-
From: Santana [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August
On 6/28/07, sum_duud [EMAIL PROTECTED] wrote:
in essence I would like the perl script to output all the fourth
column 0 values to a file called phase_0.csv and all the 1 values
to phase_1.csv etc.
snip
use an array of file handles (warning, untested):
use strict;
use warnings;
open my $in,
I have a large CSV file of the format x,y,z,number (a coordinate file)
that I need to parse and output as individual files based on the
fourth field (column 3). The file looks like the sample below, and
the fourth field can be from zero to 20,
so in essence I would like the perl script to output
On 6/24/07, Tom Phoenix [EMAIL PROTECTED] wrote:
On 6/24/07, Mihir Kamdar [EMAIL PROTECTED] wrote:
I have a csv file having 3rd field as phone number series. In that
field,
some of the records are phone number ranges like 097611/4
Now I need to seperate this into 4 numbers and store them one
On 6/25/07, Mihir Kamdar [EMAIL PROTECTED] wrote:
if (2 != ($#ARGV+1)) {
That works, but it's usually written more like this:
if (@ARGV != 2) {
open INFILE, $ARGV[0] || die unable to open INFILE;
open OUTFILE, $ARGV[1] || die unable to open OUTFILE;
These don't do what they look
Hi,
I have a csv file having 3rd field as phone number series. In that field,
some of the records are phone number ranges like 097611/4
Now I need to seperate this into 4 numbers and store them one after the
other, like:-
097611
097612
097613
097614
There are more than 1000 records in the csv
On 6/24/07, Mihir Kamdar [EMAIL PROTECTED] wrote:
Hi,
I have a csv file having 3rd field as phone number series. In that field,
some of the records are phone number ranges like 097611/4
Now I need to seperate this into 4 numbers and store them one after the
other, like:-
097611
097612
097613
On 6/24/07, Mihir Kamdar [EMAIL PROTECTED] wrote:
I have a csv file having 3rd field as phone number series. In that field,
some of the records are phone number ranges like 097611/4
Now I need to seperate this into 4 numbers and store them one after the
other, like:-
097611
097612
097613
Roman Daszczyszak schreef:
#!\perl\perl.exe
Does that do anything useful? Maybe change to just
#!perl
my @lines = @{$csv_file-lines()};
shift @lines; # Strips off the header line before processing
Variant:
(undef, @my lines) = @{$csv_file-lines()} ;
--
Affijn, Ruud
Gewoon is een
1 - 100 of 196 matches
Mail list logo