Harry Putnam wrote:
> Probably painfully obvious...
>
> Where is this preceding space coming from:
>
> cat test_space.pl
> ^^^^^^^^^^^^^^^^^^^^^
> #!/usr/local/bin/perl -w
> open(FILE,">file");
> @array = (
> "line 1\n",
> "line 2\n",
> "line 3\n",
> "\n",
> );
>
> print FILE "@array";
Don't use the double quotes here. That's where the extra space is coming
from.
just use:
print FILE @array;
see perldoc perlvar, search for the special variable $" (dollar-quote)
> system("cat file");
> ^^^^^^^^^^^^^^^^^^^^
>
> (Run test_space.pl)
>
> reader $ ./test_space.pl
> line 1
> line 2
> line 3
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]