Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Spreadsheet::ParseExcel format help

by Anonymous Monk
on Jul 17, 2013 at 03:49 UTC ( #1044703=note: print w/replies, xml ) Need Help??

in reply to Spreadsheet::ParseExcel format help

Replies are listed 'Best First'.
Re^2: Spreadsheet::ParseExcel format help
by cyates (Novice) on Jul 17, 2013 at 04:43 UTC

    Simplest answers are the best =] working with CSV values would be good, my problem was the annoying single quotes ' ' and this little code took care of it for me:

    #!/usr/bin/perl use strict; use warnings; my $sometext = 'somefile.txt'; open(SOME, $sometext); while(<SOME>) { chomp; $a = $_; $a =~ s/'//g; print $a; }
      Please don't use $a or $b as variable names -- NOT EVEN IN EXAMPLES; they have specialized behaviors for use when sorting... and they don't provide any indication of their content. Some short (1 letter) possibilities: $s (for "string"); $l for line; etc. etc.

      P.S: syntacticly trivial, but annoying: You changed the character you wanted removed from a comma in your OP to a single quote in your 'simplest answer.' Perhaps one was a typo, and in this thread, probably just set off my pre-coffee compulsiveness/ill-humor/whatever... but like $a, it sets a bad example for future readers.

      If I've misconstrued your question or the logic needed to answer it, I offer my apologies to all those electrons which were inconvenienced by the creation of this post.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044703]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2018-06-24 09:48 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.