Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Using perl script to covert .html file to tab delimited file

by hippo (Bishop)
on Oct 01, 2020 at 10:10 UTC ( [id://11122407]=note: print w/replies, xml ) Need Help??


in reply to Using perl script to convert .html file to tab delimited file

Hello, ssaahh. Welcome to the Monastery.

The script dicthtml2tab.pl is quite simple. It takes the input file as argument and writes to standard output. Therefore, assuming you are on a unix-like OS or at least using a standard shell, the steps to use it are:

  1. Download the file
  2. Make sure you can run it: chmod a+rx dicthtml2tab.pl
  3. Run it: ./dicthtml2tab.pl myinputfile > myoutputfile

Note that the dicthtml2tab.pl script uses regex to parse HTML which is, at best, fragile. If this is a common enough task then it might be better for someone to write and publish a new script which uses a proper HTML parser instead. But that's for another day.


🦛

Replies are listed 'Best First'.
Re^2: Using perl script to covert .html file to tab delimited file
by ssaahh (Initiate) on Oct 01, 2020 at 13:42 UTC

    First of all,thanks for replying I use windows 10 so how to use it there.

      strawberry perl or perl via cygwin
        As I said I donot know anything about coding,Can you tell me how to actually run script and input that file.I installed strawberry perl and opened strayberry perl command line.And pasted the location of that dicthtml2opf.pl file location and file to be inputted.It gives error as it picks up that location as some command.Also,where will the output file be stored?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-16 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found