It's totally odd. I am building a database. Here is the code...
#!/usr/bin/perl
require "../library/one.lib"; #pulls perl library
require "../library/html.lib"; #pulls perl library
&mime; #lets browser know its html output
&parse;
$user = $ENV{'QUERY_STRING'}; #GET USERS LOGIN
$item = $formdata {'item'}; #pull data from form
#SPLIT ITEMS IN ARRAY OF DESIRED ITEMS TO BE DELETED
@delete = split(/,/, $item); #INDIVIDUAL ITEMS ACCESSIBLE WITH DUMMY VARIABLE
$numitems = @delete; #STORE NUMBER OF ITEMS TO BE DELETED
#RETRIEVE DATA IN ITEMSLOG AND SINGLE OUT ITEM FOR COMPARISION
open (MASS, "<../../$user/items/items.log"
|| &errormes; #READ CONTENTS OF MEMBERS ITEMS
flock (MASS, 2); #CREATE EXCLUSIVE ACCESS
@original = <MASS>; #DUMP ALL ITEMS TO ARRAY
flock (MASS, 8); #RELEASE EXCLUSIVE ACCESS
close (MASS); CLOSE FILE
#SPLIT ORIGINAL ARRAY TO SEPARATE ITEMS
$orig = @original[0]; #DUMP CONTENTS OR ARRAY TO SCALOR TO SPLIT
@compare = split(/:/, $orig); #INDIVIDUAL ITEMS ACCESSIBLE WITH DUMMY VARIABLE
$numitems2 = @compare; #STORE NUMBER OF ITEMS TO VARIABLE
print "hello";
For some odd reason, File opens fine and is read, but hello doesn't print. If I remove the code that opens the file, hello prints fine. This is part of a routine that is going to delete items from a comma delimited text file, it's odd, I am decently familiar with perl, I just run into this output problem sometimes when I open a file. What causes this? Thanks
#!/usr/bin/perl
require "../library/one.lib"; #pulls perl library
require "../library/html.lib"; #pulls perl library
&mime; #lets browser know its html output
&parse;
$user = $ENV{'QUERY_STRING'}; #GET USERS LOGIN
$item = $formdata {'item'}; #pull data from form
#SPLIT ITEMS IN ARRAY OF DESIRED ITEMS TO BE DELETED
@delete = split(/,/, $item); #INDIVIDUAL ITEMS ACCESSIBLE WITH DUMMY VARIABLE
$numitems = @delete; #STORE NUMBER OF ITEMS TO BE DELETED
#RETRIEVE DATA IN ITEMSLOG AND SINGLE OUT ITEM FOR COMPARISION
open (MASS, "<../../$user/items/items.log"
flock (MASS, 2); #CREATE EXCLUSIVE ACCESS
@original = <MASS>; #DUMP ALL ITEMS TO ARRAY
flock (MASS, 8); #RELEASE EXCLUSIVE ACCESS
close (MASS); CLOSE FILE
#SPLIT ORIGINAL ARRAY TO SEPARATE ITEMS
$orig = @original[0]; #DUMP CONTENTS OR ARRAY TO SCALOR TO SPLIT
@compare = split(/:/, $orig); #INDIVIDUAL ITEMS ACCESSIBLE WITH DUMMY VARIABLE
$numitems2 = @compare; #STORE NUMBER OF ITEMS TO VARIABLE
print "hello";
For some odd reason, File opens fine and is read, but hello doesn't print. If I remove the code that opens the file, hello prints fine. This is part of a routine that is going to delete items from a comma delimited text file, it's odd, I am decently familiar with perl, I just run into this output problem sometimes when I open a file. What causes this? Thanks