From: Ninja Li on
Hi,

I saw the following code about splitting a file into several pieces:

perl -014pe 'open(STDOUT,">fred.$.")' fred

I couldn't find what -014 means. Please advise.

Thanks in advance.

Nick
From: sln on
On Thu, 4 Mar 2010 10:00:31 -0800 (PST), Ninja Li <nickli2000(a)gmail.com> wrote:

>Hi,
>
> I saw the following code about splitting a file into several pieces:
>
> perl -014pe 'open(STDOUT,">fred.$.")' fred
>
> I couldn't find what -014 means. Please advise.
>
> Thanks in advance.
>
> Nick

perl -h

Usage: .....
-0[octal] specify record separator (\0, if no argument)

From: Jim Gibson on
In article
<9919d605-26f7-4aac-9e01-8d7cd33362f0(a)i25g2000yqm.googlegroups.com>,
Ninja Li <nickli2000(a)gmail.com> wrote:

> Hi,
>
> I saw the following code about splitting a file into several pieces:
>
> perl -014pe 'open(STDOUT,">fred.$.")' fred
>
> I couldn't find what -014 means. Please advise.

See 'perldoc perlrun':

"Switches include:

-0[octal/hexadecimal]
specifies the input record separator ($/) as an octal or
hexadecimal number. "

--
Jim Gibson
From: Ninja Li on
Thanks all for your help.