badrinath chitrala wrote:
> Hi
Hello,
> Can sombody hepl me in the below prog
> I could not get any output
What output were you expecting to get? What input did you give your program?
> please tell me the mistake i hav done and where
> also suggest me how to go with this
>
> my $lineno;
> my
Hi,
For beginners,someone should always add this statement at the top:
use strict;
>my $lineno;
Good.
>my $current =3D "";
Here maybe you want: my $current = '3D';
In strict mode,bareword "3D" is not allowed.
>
>while(<>){
> if($current ne $ARGV){
$ARGV contains the name of the current file wh
badrinath chitrala wrote:
: Can sombody hepl me in the below prog
Can you tell us what it is suppose to do? It looks like
you are trying to add line numbers to a file and print the
result.
: I could not get any output
What is on your command line? What is in the file which
is processe
Hi
Can sombody hepl me in the below prog
I could not get any output
please tell me the mistake i hav done and where
also suggest me how to go with this
my $lineno;
my $current =3D "";
while(<>){
if($current ne $ARGV){
$current =3D $ARGV;
print "\n\t\tFile: $ARGV\n\n";
$lineno=3D1;
}
print