fetchrfc.pl 800 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/perl
  2. use LWP::Simple;
  3. $type = shift @ARGV;
  4. if($type eq '-rfc'){
  5. $rfc = shift @ARGV;
  6. getstore("http://flintfam.org/rfcs/rfc${rfc}.txt", "rfc${rfc}.txt");
  7. }elsif($type eq '-bcp'){
  8. $bcp = shift @ARGV;
  9. getstore("http://flintfam.org/rfcs/bcp/bcp${bcp}.txt", "bcp${bcp}.txt");
  10. }elsif($type eq '-fyi'){
  11. $fyi = shift @ARGV;
  12. getstore("http://flintfam.org/rfcs/fyi/fyi${fyi}.txt", "fyi${fyi}.txt");
  13. }elsif($type eq '-ien'){
  14. $ien = shift @ARGV;
  15. getstore("http://flintfam.org/rfcs/ien/ien${ien}.txt", "ien${ien}.txt");
  16. }elsif($type eq '-std'){
  17. $std = shift @ARGV;
  18. getstore("http://flintfam.org/rfcs/std/std${std}.txt", "std${std}.txt");
  19. }else{
  20. $rfc = $type;
  21. getstore("http://flintfam.org/rfcs/rfc${rfc}.txt", "rfc${rfc}.txt");
  22. }
  23. #getstor($url, $file)