+warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
+
;# $RCSfile: getopt.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:23:58 $
#
# This library is no longer being maintained, and is included for backward
#
# Suggested alternatives: Getopt::Long or Getopt::Std
-warn( "The 'getopt.pl' legacy library is deprecated and will be"
- . " removed in the next major release of perl. Please use the"
- . " Getopt::Long or Getopt::Std modules instead." );
-
;# Process single-character switches with switch clustering. Pass one argument
;# which is a string containing all switches that take an argument. For each
;# switch found, sets $opt_x (where x is the switch name) to the value of the
sub Getopt {
local($argumentative) = @_;
local($_,$first,$rest);
- local($[) = 0;
while (@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) {
($first,$rest) = ($1,$2);
- if (index($argumentative,$first) >= $[) {
+ if (index($argumentative,$first) >= 0) {
if ($rest ne '') {
shift(@ARGV);
}