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
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
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
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 $/ =
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