Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Doubt regarding parsing

by Not_a_Number (Prior)
on Apr 04, 2012 at 18:37 UTC ( #963507=note: print w/replies, xml ) Need Help??


in reply to Re^2: Doubt regarding parsing
in thread Doubt regarding parsing

Why have you changed the single backslash to a double backslash?

Update: oops, too late...

Replies are listed 'Best First'.
Re^4: Doubt regarding parsing
by pavanpvss (Novice) on Apr 04, 2012 at 19:10 UTC
    use Spreadsheet::ParseExcel; my $filename = shift || 'C:\Earthlink.xls'; my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse($filename); if ( !defined $workbook ) { die $parser->error(), ".\n"; }

    I have done exactly as you have told. But still i find the error "File Not found" . I have cross checked whether i have put the file in C:\ or not. I have done that. Can you please help me out. Thanks in advance

      No, you have not done "exactly" as toolic suggested. You're showing us single quotes around the file name. c.f. his line 3 at his first reply. See also any of the standard references re "interpolation."

      pavanpvss sometimes you are not in the directory that you thought you were in. Try adding the following line to your code and run it before the 'my $filename' line.

      map { print $_ . "\n" } <C:\*>;

      Then check the output for your file. (note the similarities of the C:\ to your filename call).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://963507]
help
Chatterbox?
[M4ver1k]: I feel like being able to toggle a running script on the fly by updating variables from a config file using Config::Simple. But in the while loop, it seems like it doesn't update the variable after the first past. Is this generally just a bad idea?
[M4ver1k]: pass*

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2017-11-20 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (283 votes). Check out past polls.

    Notices?