<?xml version="1.0" encoding="windows-1252"?>
<node id="1008229" title="create gagillian files in current directory" created="2012-12-11 02:47:28" updated="2012-12-11 02:47:28">
<type id="1042">
CUFP</type>
<author id="1003815">
jonagondos</author>
<data>
<field name="doctext">
&lt;p&gt;
hi this script creates a gagillian files in your current directory and reverses a file, enjoy lol.

&lt;code&gt;
#!/usr/bin/Perl

if (@ARGV != 1) {
	print "usage ./catrev.pl file1\n";
	print "@ARGV";
	exit;
}

else {

	$file1 = pop(@ARGV);
	
	open(FILE1,$file1);
	
@array1 = &lt;FILE1&gt;;

foreach (@array1) {
	$each = reverse($_);
	print "$each\n"

}

print "what would you like your file name to be?\n";
$filename = &lt;STDIN&gt;;
chomp ($filename);

if (($filename eq "") || (defined $filename eq 'false')) {
	print "enter some data!";
	exit;
}

else {
	sub hellofile {
print "$_[0] is the file to be written";

open (FILE, "&gt; $_[0]") or die "cant create file";

}
$i == 0;
while ($i &lt; 1000000000000000000000) {
hellofile($filename);
$filename .= poop;
$i++;
}

}

} 
&lt;/code&gt;</field>
</data>
</node>
