There is a problem with developing Perl scripts today: The code in the samples given by Qualcomm is judged by the number of elements in the argv array, with the following code:
Sub parsearguments{# Assume failure my $RC=false; My $Txt=""; My $Help="syntax:perl grep_isf.pl <Input_ISF_File.isf> <string_to_be_searched> \ n" . "eg:perl grep_isf.pl s1.isf \ "Mc_reset|jammer in Max bin\" \ n"; if($ #ARGV <0) {print"\n$help\n"; return$RC; } My $ISFFileName= $ARGV [0]; if($ISFFileName eq"") {$Txt="Invalid ISF file name\n\n". $Help; Print"\n$txt"; return$RC; } $ISFAbsolutePath=Getpathfromscript (); if($ISFAbsolutePath eq"") {$Txt="Invalid ISF file name\n\n". $Help; Print"\n$txt"; return$RC; } Else{$ISFAbsolutePath.=$ISFFileName; } $SearchString= $ARGV [1]; if($SearchString eq"") {$Txt="Invalid Search string\n\n". $Help; Print"\n$txt"; return$RC; } # Success $RC=true; return$RC;}
But exhausted a lifetime also did not find argv statement, this time Guo Hong ran over and I complained that this thing can not run, I looked up, just found Shia.
ARGV is actually one of the default two parameters of the main function, and the details of the instruction are stored in the array.
For example: We wrote the hello.exe is generally run directly, without adding any parameters. However, as a qualified exe, it is possible to add parameters through the command line, such as we can do: Hello.exe a b c d E
So the contents of the argv array are stored as follows:
argv[0] = hello.exe;
ARGV[1] = A;
ARGV[2] = b;
ARGV[3] = c;
ARGV[4] = D;
ARGV[5] = e;
So I think the relationship between the automation script and the QXDM should be connected by command-line arguments and commands. Think again in the afternoon, go to dinner
The role of the argv array