Hello together, I have another problem with arguments and switches as options for a process. I want one switch and several arguments to call the process. Example: kermit.pl -v thunder.txt compare.txt
I try to implement this actually with a hash: #!/usr/bin/perl use warnings; use strict; use File::Copy; use Getopt::Std; my %option = (); getopts ("vp:", \%option ); our ( $opt_v, $opt_p ); #our $searchpattern = %option{p}; our $input; our $searchpattern; if ( $option{v} ) { print "The searchpattern ist: $searchpattern and the input $input \n"; } ..... So far it should work. But I get this output: Name "main::opt_p" used only once: possible typo at ./kermit.pl line 14. Use of uninitialized value in concatenation (.) or string at ./kermit.pl line 20. Use of uninitialized value in concatenation (.) or string at ./kermit.pl line 20. The searchpattern ist: and the input What is the problem? Thank you. Gruss Christian -- Christian Stalp Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI) Obere Zahlbacher Straße 69 55131 Mainz Tel.: 06131/ 17-6852 E-Mail: [EMAIL PROTECTED] Internet: www.imbei.de -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>