myperl.org
You can find perl snippets here. Copy, Paste and Run.
about MyPerl : All the code snippets listed in this site are in public domain. Do the right thing, Do perl.
| system out using perl #!/usr/bin/perl print "Hellow World"; Reading a file. #!/usr/bin/perl $file_name = "football.txt"; $file_path = "/home/gnu/"; Open(FILE,$file_path.$file_name); @file_content = <FILE>; close(FILE); Writting to a file. #!/usr/bin/perl $file_name = "football.txt"; $file_path = "/home/gnu/"; $content_to_write = "New line for the file"; Open(FILE,">$file_path.$file_name"); print FILE $content_to_write; close(FILE); |