in reply to Recover Excel datas

To me it seems you have a set of URLs in a CSV file and you want to visit them one-by-one and take a screenshot when their html renders.

Why involve excel at all? (are your troubles not enough?). A CSV file can be parsed by much simpler methods, for example using Text::CSV, or by a regex.

Secondly, in the above code you do not know where the error occurs. Indeed there is no mention of a line-number in your own code but there is a reference to some Selenium code. OK, that bugs me too - often I am in the same situation where I need to see where my program died. What I would do if I feel lazy is to insert a print "i am here 1\n"; exit(0); (incrementing 1 to 2, to 3 etc. for each line) in between each line after my $driver for a few lines and keep running the program until the message of death arrives. This is lame but hey it cost me 3 minutes (for that simple code) but eventually lead me to the root of it. I could even make a macro in my editor to do all the inserts for me.

There is an easier way though which is to run perl in debug mode. This will tell you exactly where it died: perl -d <program-name> then press c to run it.

Replies are listed 'Best First'.
Re^2: Recover Excel datas
by Perlchaoui (Sexton) on Nov 15, 2018 at 11:01 UTC

    Many thanks for your advices bliako

    I started with the idea to use an Excel file because in my company we are often using Excel spreadsheets