×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

control caracters passed in parameter

control caracters passed in parameter

control caracters passed in parameter

(OP)
Hi
I'm new to perl and what I want to do is this:
I'm receiving a string which contain control caracters ex: $
Perl is interpreting them as a variable
ex : 02,$VER,DO
what I receive in perl is :02,,DO
what I expect to receive : 02,$VER,DO
tks in advance
Annie

RE: control caracters passed in parameter

throw the '\' character (only the \, not the ') in front of it. That's your control character. Best of luck!

Liam Morley
lmorley@wpi.edu
] :: imotic :: website :: [
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."

RE: control caracters passed in parameter

(OP)
I can't put the caracter \ before the $ sign .Because I receive the  list who contain it from a rex .The rex script call my perl script and gives him parameters which contain $,@ and # caracters.From the moment I received the list perl sees them as variable

RE: control caracters passed in parameter

a rex? I'm not familiar with rex..

Liam Morley
lmorley@wpi.edu
] :: imotic :: website :: [
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."

RE: control caracters passed in parameter

Without seeing your code, I'm guessing that you are using double quotes (") to surround the string you are receiving?  For example:

$My_Received_String = $ARGV[0];

print "$My_Received_String\n";

This would exhibit the behaviour you describe.  To prevent perl from interpreting $VER as a scalar, surround the string in single quotes (').  For example:

$My_Received_String = $ARGV[0];

print '$My_Received_String\n';

That should do the trick.

PS, if I recall correctly, isn't REX a programming language from IBM?  And if TeX (the layout language) is pronounced "Tek", is REX pronounced "Rek"? </bad humour off>  ;^)




--
0 1 - Just my two bits

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close