http://qs1969.pair.com?node_id=362401

"I want to do something that is done in twenty-seven modules on CPAN, but without using modules. Please reinvent the wheel for me."

Since I'm all out of downvotes for the day, let's take a stab at solving the real problem: why does the OP think that they cannot use modules?

Start Here

I have looked for a module to do this task.

I have found a module to do this task.

I want to use a module.

I am allowed to use a module.

I know how to install a module.

I am able to install the module in the default location.

I know how to install and use modules in a non-standard location

I have tried to install, but got an error

There is a technical reason I cannot use a module

The target machine can run the module, but cannot compile it

Are you allowed to use the code in the module?

Why can't you use the code?

I am using ...

You are asking the wrong question

Please check the correct instructions. If they fail, post asking for help with installing the module. Be sure to include the exact text of the error message you received.

Get the binary from somewhere else

Either compile it on another machine or find a binary precompiled. If you cannot do either, then keep searching.

This module won't work

You need to keep searching.

Use the source, Luke ...

Look inside the source code of the module to see one way to do it. If you do not understand parts of the module, ask for clarification.

TANSTAAFL

If you cannot abide by the license, you need to keep searching. But if you are asking for free development work on code you intend to sell, don't bother.

Then why are you asking for help?

If your whole point is to do it yourself, what are you asking us for?

Ask if anyone else knows of one

It can be difficult to find what you want on CPAN. You will get the best results if you indicate what you have looked at and why it won't work. The reasons will help weed out additional suggestions that would not work for the same reason, or help people who wish to offer custom answers to better meet your needs.