RE: reference problem (i think)

2003-01-13 Thread Joe Mecklin
David, this appears to be exactly what i was looking for, and i thank you with infinite groveling *g*. the reason i wanted something like this is because i like to name my variables and cgi parameters the same as my database fields - $school_id = school_id (cgi parameter) = school_id (mysql field

RE: reference problem (i think)

2003-01-13 Thread Dan Muey
Excellent info! -Original Message- From: david [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 1:59 PM To: [EMAIL PROTECTED] Subject: RE: reference problem (i think) Joe Mecklin wrote: > Dan, > > here is the output with your additions. > > BEFORE :: ID - 101

RE: reference problem (i think)

2003-01-13 Thread david
Joe Mecklin wrote: > Dan, > > here is the output with your additions. > > BEFORE :: ID - 101 > NM - Arapaho Elementary > AD - 1300 Cypress Dr. > > # this is the call to clear_input in ISD.pm > $fields = school_id, school_name, school_address > @field = school_id school_name school_address

RE: reference problem (i think)

2003-01-13 Thread Joe Mecklin
ELDS => "school_id, school_name, school_address"); > > Print "AFTER :: ID - $school_id \n NM - $school_name \n AD - > $school_address \n"; > > exit; > > > > > > > -Original Message- > From: Joe Mecklin [mailto:[EMAIL PROTECTED]] >

RE: reference problem (i think)

2003-01-13 Thread Dan Muey
us know if it can access the variable >directly or not > #&ISD::clear_input(FIELDS => "school_id, school_name, school_address"); > > Print "AFTER :: ID - $school_id \n NM - $school_name \n AD - > $school_address \n"; > > exit; > > > > > &

RE: reference problem (i think)

2003-01-13 Thread Joe Mecklin
ot > #&ISD::clear_input(FIELDS => "school_id, school_name, school_address"); > > Print "AFTER :: ID - $school_id \n NM - $school_name \n AD - > $school_address \n"; > > exit; > > > > > > > -Original Message- > From: J

RE: reference problem (i think)

2003-01-13 Thread Dan Muey
e, school_address"); Print "AFTER :: ID - $school_id \n NM - $school_name \n AD - $school_address \n"; exit; -Original Message- From: Joe Mecklin [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 12:34 PM To: Dan Muey Subject: RE: reference problem (i think)

RE: reference problem (i think)

2003-01-13 Thread Dan Muey
script I sent? What does it output? -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 12:17 PM To: [EMAIL PROTECTED] Subject: Re: reference problem (i think) Hi Joe I got a bit lost amongst all those 'print' statements, but

Re: reference problem (i think)

2003-01-13 Thread Rob Dixon
Hi Joe I got a bit lost amongst all those 'print' statements, but what you need to know is this: $current_field = 'school_id'; ${$current_field} = 1234;# same as $school_id = 1234 HTH, Rob "Joe Mecklin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTE

Re: reference problem (i think)

2003-01-13 Thread Rob Dixon
Hi Joe I got a bit lost amongst all those 'print' statements, but what you need to know is this: $current_field = 'school_id'; ${$current_field} = 1234;# same as $school_id = 1234 HTH, Rob "Joe Mecklin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTE

RE: reference problem (i think)

2003-01-13 Thread Joe Mecklin
-- > From: Joe Mecklin [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 13, 2003 11:44 AM > To: [EMAIL PROTECTED] > Subject: RE: reference problem (i think) > > > thanks Dan, but no go. here is the current incarnation, based on your > suggestion: > > sub cl

RE: reference problem (i think)

2003-01-13 Thread Dan Muey
d you get that from? ( It could be totally legit I've just never seen it. ) Dan -Original Message- From: Joe Mecklin [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 12:05 PM To: [EMAIL PROTECTED] Subject: RE: reference problem (i think) yes, the variables exist in the cal

RE: reference problem (i think)

2003-01-13 Thread Joe Mecklin
may be better as -$$f- instead of .$$f. just incase >it's trying to use a var named $f. instead of $f. > > Dan > -----Original Message- > From: Joe Mecklin [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 13, 2003 11:44 AM > To: [EMAIL PROTECTED] > Subject: RE: re

RE: reference problem (i think)

2003-01-13 Thread Dan Muey
hat you get. Also print "\$f = $f = .$$f." may be better as -$$f- instead of .$$f. just incase it's trying to use a var named $f. instead of $f. Dan -Original Message- From: Joe Mecklin [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 11:44 AM To: [EMAIL PROTECTED

RE: reference problem (i think)

2003-01-13 Thread Joe Mecklin
thanks Dan, but no go. here is the current incarnation, based on your suggestion: sub clear_input { no strict 'refs'; my %options = @_; my $fields = $options{FIELDS}; my (@field) = split /, /, $fields; print "\$fields = $fields "; print "\@field = @field ";

RE: reference problem (i think)

2003-01-13 Thread Dan Muey
foreach $f(@fields) { $$f = ""; # or use undef, whatever } If strict refs is in use this won't work unless you turn them off do the $$f = ""; bit then turn them back on if stricy refs was in use So actually ( or somehting like it, I'm in a hurry and may have been sloppy )... foreach $f