begin_101 has asked for the wisdom of the Perl Monks concerning the following question:
I'm a new new-bee to Perl. I'm trying to convert my shell script to adapt to perl.
Please help me in building a regular expression for converting the below shell command `uuidgen | tr '\-abcdef' '9012345' | cut -c-10`
If the output of uuidgen is a81f9284-b353-430a-a8ce-85b8118d3f3e, I'm expecting it to print it as 0815928491. I tried with system('uuidgen') to generate the uuid, but unable to process it using the regular expression.
As tr does the translation and gives as 081592849135394300908249851811833534 and 'cut -c-10' gives the first 10 digits.
CheersRaj
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help in building Regular expression
by toolic (Bishop) on Jan 17, 2012 at 20:14 UTC | |
|
Re: Help in building Regular expression
by tobyink (Canon) on Jan 17, 2012 at 20:22 UTC | |
by begin_101 (Initiate) on Jan 17, 2012 at 23:11 UTC | |
by Anonymous Monk on Jan 18, 2012 at 03:45 UTC | |
|
Re: Help in building Regular expression
by planetscape (Chancellor) on Jan 18, 2012 at 08:58 UTC |