Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Spreadsheet::ParseExcel format help

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

Comment on Re: 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044703]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-29 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls