[PLUG] Need help finding package with 'rename'

Shahms E. King shahms at shahms.com
Fri May 3 20:16:33 UTC 2002


Yeah, you're right, I fudged the script, doh, but you can change $ARGC
to $#ARGV and it should work.

--Shahms

On Fri, 2002-05-03 at 13:31, Brian Horan wrote:
> I don't recall $ARGC being automatically defined and filled in with perl...
> because $ARGV[0] in perl is equivalent to argv[1] in C (if you call it that 
> which you should, I guess)
> 
> is $ARGC defined as ++$#ARGV (or some other less sloppy construct)?
> 
> the if() conditional appears to be failing because of $ARGC, but I haven't 
> seen the whole script so I can't be sure..
> 
> 
> On Friday 03 May 2002 03:36 pm, you wrote:
> >   I don't see the source of the error, perl gurus.
> >
> >   This is the line calling the 'rename' script:
> >
> > /usr/lib/rpm/rename.pl so.%{solibbase} so.%{version}
> > $RPM_BUILD_ROOT/lib/*.so.%{solibbase}
> >
> > and here is the first few lines of the script that generates the error:
> >
> > #!/usr/bin/perl -w
> >
> > if ( $ARGC < 3 ) {
> >         usage();
> >         exit(1);
> > }
> >
> >   The error message cits the usage text:
> >
> > sub usage
> > {
> >         print "$0 <from> <to> <files...>\n";
> > }
> >
> >   Looks to me like three arguments. Could it be the globbing that causes
> > the problem?
> >
> > Thanks,
> >
> > Rich
> >
> >
> > _______________________________________________
> > PLUG mailing list
> > PLUG at lists.pdxlinux.org
> > http://lists.pdxlinux.org/mailman/listinfo/plug
> 
> -- 
> Brian Horan
> bhoran at hexdev.com
> 
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
> 





More information about the PLUG mailing list