Solved

Easy One!

Posted on 2004-10-12
3
132 Views
Last Modified: 2013-12-25
I have been doing this quite a while, perl, this one is just bugging me.

I have a fixed variable called
$A = "0001";
that resides in a delimited database.
I have 2 pics for each data piece, one called 0001 and the other 0001L

Now when I call up this:
$pic = "$A";
print "http://www.mydomain.com/$A.jpg";
pulls pic just fine....

But when I try this:
print "http://www.mydomain.com/$AL.jpg";
to call up the other pic, it does not work!
0
Comment
Question by:precision
3 Comments
 
LVL 3

Accepted Solution

by:
WhisperUK earned 400 total points
ID: 12292900
I dont know PERL but i do a bit of unix scripting and I can see straight away that in the secong example you are actually asking for a variable named $AL  and you haven't got one of them. Curly braces might be the answer here so
try this instead:

print "http://www.mydomain.com/${A}L.jpg";

Hope that helps :)
0
 
LVL 84

Assisted Solution

by:ozo
ozo earned 100 total points
ID: 12294685
I do know Perl, and  WhisperUK is correct.
0
 

Author Comment

by:precision
ID: 12296836
Thanks guys!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to dynamically set the form action using jQuery.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now