Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2016-10-26 03:45 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (333 votes). Check out past polls.