in reply to Creating file at run time

I am by no means an expert, but my advice is always, search the site before posting already answered questions. But seeing how you posted as an anonymous monk, it is clear you are ashamed. anyway what you're doing wrong, is trying to open a file that doesn't exist for reading. You need to open it for writing first, which should create the file. something like this:
#!/usr/bin/perl $Inputfile='filename'; open (OUT, ">$inputfile.out") or die "cannot open file 4 writing: $!\n"; open (IN,"<$Inputfile") or die "cannot open file: $!\n"; while (<IN>){ .... ..... print OUT; #print to $Inputfile.out file }

"cRaZy is co01, but sometimes cRaZy is cRaZy".
                                                      - crazyinsomniac