On Fri, Jun 19, 2009 at 14:03, Scott<tacogrand...@hotmail.com> wrote:
> I am learning perl and my code is using strict. I thought it would help me
> learn better then being sloppy.
>
> I am trying to connect to a sql database and my password contains a @ in the
> middle of the word
> so
> my $pass = "p...@word";
>
> its killing my script and i cant seem to find anything on the internet on
> how to just use p...@word as pure text.
> I've tried /p...@word/ but that didn't help and im sorta out of ideas, im
> going to go get a perl book from my college library maybe it has an answer.
>
> Anyone know what to do?
snip

You have two good choices:

my $pass = 'p...@word';
my $pass = "pa...@word";

The first one is generally preferred, but the knowing about the second
is handy in situations like this:

my $string = "Hello $name, my email address is f...@example.com";

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to