But the commands do still run in the command line, is there anyway to throw a
perl variable in there?
yitzle <[EMAIL PROTECTED]> wrote: Perl captures the output from backticks so
nothing gets printed to the screen.
__CODE__
my $x = "efg";
my $y = `echo $x`;
print $y;
__OUTPUT__
efg
__END__
--
Hi all,
I am having trouble representing a perl variable when using back ticks to run
commands from the unix command line. A simple example would be:
#!usr/bin/perl
$X = $ARGV[0];
`echo $X`;
This does not work (neither does `echo \$X`;). Is there anyway to represent a
perl variable when usin
Oh, I thought that they might be portable between OSs. My bad.
"Chas. Owens" <[EMAIL PROTECTED]> wrote: On 10/26/07, Yoyoyo Yoyoyoyo wrote:
> Hi all,
>
> I was interested in compiling my Perl code. I came across the following site
> that shows how to do it:
Hi all,
I was interested in compiling my Perl code. I came across the following site
that shows how to do it:
http://www.expertsrt.com/tutorials/Matt/perlPAR.html
I followed the instructions (I am using PAR and PAR-Packer version 0.976). It
works fine on my Mac, but If I take an executable t
On Aug 25, 2007, at 4:54 AM, Yoyoyo
Yoyoyoyo wrote:
> I use a mac and I was wondering if there was a way to convert unix
> newlines in a text file to dos newlines.
Yeah, with a Perl one-liner it would be
perl -pi -we 's/\n/\r\n/' file.txt
or
perl -pi.bak -we 's/\
Hi all,
I use a mac and I was wondering if there was a way to convert unix newlines in
a text file to dos newlines.
Robert
-
Boardwalk for $500? In 2007? Ha!
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
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
Hi all,
I have a file that I need to use the substitute operator on to get rid of
spaces, and apostrophes and such. The only way I can think of doing it is this:
1. Open the file and go through it one line at a time with the diamond
operator.
2. Make the substitutions on the $_ variable and