On 10-10-13 04:16 PM, Amish Rughoonundon wrote:
Hi,
I would like to print a file under windows using perl but with the
end of line character be only 0x0A and not 0x0D followed by 0x0A. Is
there a way to set $\ to 0x0A so that every time I use print, it only
prints 0x0A and NOT 0x0D followed by
Hi,
I would like to print a file under windows using perl but with the
end of line character be only 0x0A and not 0x0D followed by 0x0A. Is
there a way to set $\ to 0x0A so that every time I use print, it only
prints 0x0A and NOT 0x0D followed by 0x0A. Any other method would also
be welcomed. Than
This is not the most elegant solution, but it did only take me five minutes.
The salient part is the backspace and printing blanks bit. A more elegent
solution would figure out how to destructively clear the line using something
from ncurses.
#!/usr/bin/perl -w
$|=1;
@reports = ("starting", "
Paul Harwood wrote:
>
> Is there a simple way to print over an existing line?
>
> For example: I would like to have a progress report that reads 10%, 20%
> etc. I don't want to print a new line each time. I want to write over
> the existing line and have it update as it goes.
Hi Paul.
I presume y
Paul Harwood wrote:
> Is there a simple way to print over an existing line?
>
> For example: I would like to have a progress report that
> reads 10%, 20%
> etc. I don't want to print a new line each time. I want to write over
> the existing line and have it update as it goes.
>
> --Paul
Use "\r"
Is there a simple way to print over an existing line?
For example: I would like to have a progress report that reads 10%, 20%
etc. I don't want to print a new line each time. I want to write over
the existing line and have it update as it goes.
--Paul
On 2003-03-24 07:27:14 -0800, Ovid wrote:
> --- Jose Luis Martinez <[EMAIL PROTECTED]> wrote:
> > Hello Ovid
> >
> > This is the code that I am trying to run
> >
> > #!/usr/bin/perl
> >
> > my $a="Hello World";
> >
> > print $a;
>
> There is nothing wrong with this code. Thoughts:
>
> * what
--- Jose Luis Martinez <[EMAIL PROTECTED]> wrote:
> Hello Ovid
>
> This is the code that I am trying to run
>
> #!/usr/bin/perl
>
> my $a="Hello World";
>
> print $a;
There is nothing wrong with this code. Thoughts:
* what is the result of 'which perl'? Are you pointing to the same interpre
Jose Luis Martinez wrote at Sun, 23 Mar 2003 15:04:42 -0800:
> This is the code that I am trying to run
>
> #!/usr/bin/perl
>
> my $a="Hello World";
>
> print $a;
Runs fine for me,
allthough I wouldn't use $a as a variable.
(It's already a global variable used e.g. in sortings,
see perldoc pe
Hello Ovid
This is the code that I am trying to run
#!/usr/bin/perl
my $a="Hello World";
print $a;
Thanks,
JL
"Ovid" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> --- Jose Luis Martinez <[EMAIL PROTECTED]> wrote:
> > Hello All
> >
> > I installed Linux 8.0(kernel 2.4.18-14) a
--- Jose Luis Martinez <[EMAIL PROTECTED]> wrote:
> Hello All
>
> I installed Linux 8.0(kernel 2.4.18-14) and Perl V5.8.0 and when I try to
> run a Perl program with the line
> print "Hello World"
> it does not work, just perl executed it without an error.
>
> I checked it the script using
> per
Hello All
I installed Linux 8.0(kernel 2.4.18-14) and Perl V5.8.0 and when I try to
run a Perl program with the line
print "Hello World"
it does not work, just perl executed it without an error.
I checked it the script using
perl -c script_name and it return OK
Thanks
--
To unsubscribe, e-
On Wed, Dec 26, 2001 at 02:24:16PM -0800, Lance Prais wrote:
[snip]
> print (substr($line, 42, 7));
[snip]
> print substr($line, 42, 7);
>
> but getting the following error:
>
> syntax error at emailagent line 16, near ");"
The code snippets you've shown us would not result in that error messag
> -Original Message-
> From: Lance Prais [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 26, 2001 5:24 PM
> To: [EMAIL PROTECTED]
> Subject: Using print
>
>
> I am using the following statment to try to print a sub
> string of a line
> bu
I am using the following statment to try to print a sub string of a line
but
print (substr($line, 42, 7));
or
print substr($line, 42, 7);
but getting the following error:
syntax error at emailagent line 16, near ");"
Can anyone tell me what I am doing wrong?
Thank you
Lance
--
To unsubs
--- Me <[EMAIL PROTECTED]> wrote:
> > sub header {
> > print << head;
> > Content-type: text/html\n\n
> >
> > Control Panel
> >
> > head
> > }
>
> As dumb as this sounds, you can't have the 'head'
> at the end indented. Well, not without some extra
> stuff.
As a simple
[EMAIL PROTECTED] wrote:
> within my code. it works like a charm. however, when i try:
>
> sub header {
> print << head;
> Content-type: text/html\n\n
>
> Control Panel
>
> head
> }
>
> is this not working because of a fault in my syntax? or is this not
> possible withi
> sub header {
> print << head;
> Content-type: text/html\n\n
>
> Control Panel
>
> head
> }
As dumb as this sounds, you can't have the 'head'
at the end indented. Well, not without some extra
stuff.
If you run
perldoc perldata
You'll find:
If you want you
At 16:42 2001.06.03, you wrote:
>hello all-
>quick question that is definitely from a neophyte.
>
>i am currently using:
>
>sub begin {
> print "Content-type: text/html\n\n";
> print "\n";
> print "Control Panel\n";
> print "\n";
>}
>
>sub footer {
>print "\n";
>print "\n";
>}
>
>
>wit
hello all-
quick question that is definitely from a neophyte.
i am currently using:
sub begin {
print "Content-type: text/html\n\n";
print "\n";
print "Control Panel\n";
print "\n";
}
sub footer {
print "\n";
print "\n";
}
within my code. it works like a charm. however, when i
20 matches
Mail list logo