Perl

From SkyWiki

(Difference between revisions)
Jump to: navigation, search
m
Line 1: Line 1:
-
== PERL syntax ==
+
== [http://www.perl.org/ Perl] syntax ==
[[category:remember]]
[[category:remember]]

Revision as of 22:19, 15 September 2008

Perl syntax

read a file line by line

  open(IN, '<'.$ARGV[0]);
  foreach(<IN>) {
    chomp;
    print $_, "\n";
  }
  close(IN);
Personal tools