Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > cgi question kinda

Reply
Thread Tools

cgi question kinda

 
 
robin
Guest
Posts: n/a
 
      03-04-2005
I know this may not be a question for this group, but is there some
kind of
secret involved in putting a new line into a single line (non-textarea)

input field on an html page, a special kind of character perhaps? I'm
using
CGI.pm for a script and I was wondering what that character is so I can

parse it out, remove them, etc... It really screws up my bbs script
when
someone does it. Thanks in advance- Robin

 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      03-04-2005
"robin" <(E-Mail Removed)> wrote in news:1109961408.385476.297040
@g14g2000cwa.googlegroups.com:

> I know this may not be a question for this group,


Then why are you posting here.

> but is there some kind of secret involved in putting a new line into a
> single line (non-textarea)


Who knows? Why not ask a group that actually deals with HTML?

> It really screws up my bbs script when someone does it.


If that is the only thing messing up your script, then your programming
must have improved at a super-human pace.

On the other hand, if such things are messing up your script, then your
script cannot be very good.

Sinan.
 
Reply With Quote
 
 
 
 
Scott Bryce
Guest
Posts: n/a
 
      03-04-2005
robin wrote:

> I was wondering what that character is so I can parse it out, remove
> them


I would think that if you have a Perl script that has a variable that
contains a string that contains an unknown character, you should be able
to write a routine that tells you what characters are in the string.
 
Reply With Quote
 
Brian Wakem
Guest
Posts: n/a
 
      03-04-2005
robin wrote:

> I know this may not be a question for this group, but is there some
> kind of
> secret involved in putting a new line into a single line (non-textarea)
>
> input field on an html page, a special kind of character perhaps? I'm
> using
> CGI.pm for a script and I was wondering what that character is so I can
>
> parse it out, remove them, etc... It really screws up my bbs script
> when
> someone does it. Thanks in advance- Robin



I might have read this wrong but it seems to me you are asking how to remove
the newline from the end of a string that is submitted via a form. If this
is the case then -

$myvar =~ s!\n$!!;


--
Brian Wakem


 
Reply With Quote
 
David K. Wall
Guest
Posts: n/a
 
      03-04-2005
robin <(E-Mail Removed)> wrote:

> I know this may not be a question for this group, but is there
> some kind of secret involved in putting a new line into a single
> line (non-textarea)


Only the Shadow knows.

> input field on an html page, a special kind of character perhaps?
> I'm using CGI.pm for a script and I was wondering what that
> character is so I can parse it out, remove them, etc... It really
> screws up my bbs script when someone does it. Thanks in advance-
> Robin


Why not go about it the other direction? Define whch characters you
want to allow, and remove everything else.
 
Reply With Quote
 
Shawn Corey
Guest
Posts: n/a
 
      03-04-2005
Brian Wakem wrote:
>
> $myvar =~ s!\n$!!;
>

chomp ($myvar);

See perldoc -f chomp

--- Shawn
 
Reply With Quote
 
Robin
Guest
Posts: n/a
 
      03-04-2005
thanks for all your help.
-robin


 
Reply With Quote
 
Robin
Guest
Posts: n/a
 
      03-04-2005

"Brian Wakem" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> robin wrote:
>
>> I know this may not be a question for this group, but is there some
>> kind of
>> secret involved in putting a new line into a single line (non-textarea)
>>
>> input field on an html page, a special kind of character perhaps? I'm
>> using
>> CGI.pm for a script and I was wondering what that character is so I can
>>
>> parse it out, remove them, etc... It really screws up my bbs script
>> when
>> someone does it. Thanks in advance- Robin

>
>
> I might have read this wrong but it seems to me you are asking how to
> remove
> the newline from the end of a string that is submitted via a form. If
> this
> is the case then -
>
> $myvar =~ s!\n$!!;
>
>
> --
> Brian Wakem


there isn't a newline at the end of a string from a form field. The raw
data? is that what you mean?
-robin


 
Reply With Quote
 
robin
Guest
Posts: n/a
 
      03-04-2005
good call.
-robin

 
Reply With Quote
 
Robin
Guest
Posts: n/a
 
      03-04-2005

"A. Sinan Unur" <(E-Mail Removed)> wrote in message
news:Xns960F91D17DEasu1cornelledu@132.236.56.8...
> "robin" <(E-Mail Removed)> wrote in news:1109961408.385476.297040
> @g14g2000cwa.googlegroups.com:
>
>> I know this may not be a question for this group,

>
> Then why are you posting here.
>
>> but is there some kind of secret involved in putting a new line into a
>> single line (non-textarea)

>
> Who knows? Why not ask a group that actually deals with HTML?


yeah, that's what I thought.

>
>> It really screws up my bbs script when someone does it.

>
> If that is the only thing messing up your script, then your programming
> must have improved at a super-human pace.


hehehehehehe....
>


> On the other hand, if such things are messing up your script, then your
> script cannot be very good.


yeah, well, it's getting better.

>
> Sinan.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kinda embarissing question...but.. morc Java 11 01-26-2006 05:44 AM
kinda "overloading" MM VHDL 1 07-28-2004 03:45 PM
What kinda WAN is Cable modem? Dave Cisco 5 04-27-2004 12:10 PM
VERY newbie question -- kinda long Mark Nold Javascript 1 04-09-2004 12:00 PM
Kinda newb-ish question ChocoboMog123 Python 8 12-13-2003 02:41 AM



Advertisments