Command Line Arguments PowerPoint PPT Presentation

presentation player overlay
1 / 3
About This Presentation
Transcript and Presenter's Notes

Title: Command Line Arguments


1
Command Line Arguments
2
Command Line Arguments
  • Similar (yet different) to C/C
  • in C/C
  • argv contains program name and arguments
  • argc contains number of arguments plus one
  • in Perl
  • _at_ARGV contains list of arguments
  • 0 contains program name

3
Examples
  • myscript 15 4 hello
  • array _at_ARGV ? (15, 4, hello)
  • scalar 0 ? myscript
  • scalar(_at_ARGV) ? 3
  • myscript
  • _at_ARGV ? ( )
  • 0 ? myscript
  • scalar(_at_ARGV) ? 0
Write a Comment
User Comments (0)
About PowerShow.com