Re: $/ variable trouble

2007-08-24 Thread Paul Lalli
On Aug 24, 1:12 pm, [EMAIL PROTECTED] (Yoyoyo Yoyoyoyo) wrote: > Hi all, > > I am using the diamond operator to redirect input to my perl script. I want > to copy all of the input on to a single variable using the following > subroutine: > > sub getfile # Copies the file redirected to this perl

Re: $/ variable trouble

2007-08-24 Thread Mr. Shawn H. Corey
Yoyoyo Yoyoyoyo wrote: Is there anyway to add the End of file marker to the variable before I print it, so I don't have to do ctrl-d? The control-D is part of the shell, not Perl. You didn't say so but from your message I assume that this did the trick. In other words, you are not redirecti

Re: $/ variable trouble

2007-08-24 Thread yitzle
On 8/24/07, Yoyoyo Yoyoyoyo <[EMAIL PROTECTED]> wrote: > Hi all, > > I am using the diamond operator to redirect input to my perl script. I want > to copy all of the input on to a single variable using the following > subroutine: > > sub getfile # Copies the file redirected to this perl script

Re: $/ variable trouble

2007-08-24 Thread Mr. Shawn H. Corey
Yoyoyo Yoyoyoyo wrote: Hi all, I am using the diamond operator to redirect input to my perl script. I want to copy all of the input on to a single variable using the following subroutine: sub getfile # Copies the file redirected to this perl script to the varialbe $x { my $x; local $/ =

$/ variable trouble

2007-08-24 Thread Yoyoyo Yoyoyoyo
Hi all, I am using the diamond operator to redirect input to my perl script. I want to copy all of the input on to a single variable using the following subroutine: sub getfile # Copies the file redirected to this perl script to the varialbe $x { my $x; local $/ = undef; $x = <>; retur