|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
I am trying to write posted information from a form <textarea> into a file.
For reading back from file I am using the following perl:- open(INFILE, "filename"); @ALLRECORDS = <INFILE>; close INFILE; and processing each record with:- foreach $record (@ALLRECORDS) { } I cut out the newlines from the textarea value before writing the records to file with:- $textareavalue =~ s/n/#/g; This adds the # symbol where I would expect the newlines (n), but still the 'foreach $record' line takes each line of the textarea as a seperate record. Is there something else I have to cut out with the s/// command? |
|
#2
|
|||
|
|||
|
You could try something like...
foreach $record (@ALLRECORDS) { chomp; # remove a newline IF there is one $MOTHER_RECORD = $MOTHER_RECORD.$record."#"; } James |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Handling from posted form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|