Perl convert string to numeric number [closed] - perl

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to convert a string ordinal to a number in perl
I have searched but not get exact answer.
Example: if the input is
one it should be 1.
five hundred it should be 500.
three hundred it should be 300.
Is there any module to do this?

One of the best parts of Perl is CPAN and, sure enough, a couple minutes of poking around on metacpan turned up the Lingua::EN::Words2Nums module:
use Lingua::EN::Words2Nums;
$num=words2nums("two thousand and one");
$num=words2nums("twenty-second");
$num=words2nums("15 billion, 6 million, and ninteen");

Related

How can I store massive amounts of text in PostgreSQL? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I want to store massive amounts of data, specifically the amount of text equivalent to a book. How can I go about this? Is there a type of data storage that makes this process faster/easier (aka is fit) for this type of operation?
There are limits, but not that much. A single database can have (with default configurations) over a billion tables and each table can be 32TB in size.

Custom UUID's as primary keys [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I noticed that Slack uses ID's of the form U023BECGF, and not the standard f3a7a018-02da-4cdb-944c-44d073536648 you often see
What is the reasoning for this?
The code you put in your question (U023BECGF) is not a valid or complete UUID. UUIDs are 16 bytes (octets) which are represented as 32 characters of hexadcimal as standard: RFC: https://www.ietf.org/rfc/rfc4122.txt
Under no encoding is U023BECGF a representation of a 16 bytes; it's too short.
It is plausable that these keys could be incorperated into a UUID but they are not one in themselvs.
The usual reason for smaller fields is storing less data.

How to match the words in one document with several other documents and get the count in perl? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have a document with words as
spring
season
bank
Now I want to check if these words for present in several documents, lets say 10 documents. Input and the list of documents should be user defined. can anyone suggest me how to proceed?
what about grep?
grep -REic 'spring|season|bank' file1.txt file2.txt ...
check out man grep for more options.

How does an Antivirus with thousands of signatures scan a file in a very short time? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
What speed optimization techniques do antiviruses use today to scan a file, provided they have to check for all the signatures + the behavioral scan?
I'm not a antivirus programmer, but I think the scan engine scans through a file searching for known pattern inside. The greater number of patterns it can identify, the longer it will take to scan.
Optimization maybe similar to database optimization, with patterns indexing.
Identification Methods

ADO.NET Performance : Which Approach will faster and resonable? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to select certain amount of data from one table. Based on those data, I want to check another two tables and insert into 2 tables.
So I want to iterate the resulted data. Which way is better(faster) and reasonable using DataReader or DataTable?
Thanks in advance
RedsDevils
You end up creating a reader to fill the table. The reverse isn't true, So I would stick with the dataReader.
-Josh