Easy Question 2

Posted on 2000-02-09
Medium Priority
Last Modified: 2013-12-25
Help me out here...
I've got a variable $filename which contains some text, let's say:
Now I want to add to this text the following characters: ".txt" so that I get as result:

I've tried it with this code:
print "$filename !!";
but when i run it the variable still hasn't got those extra characters. Am i doing something wrong ?
Question by:oostwijk
1 Comment

Accepted Solution

elpmet earned 120 total points
ID: 2506024
Hi, I'm back again  :-)

Try the following:

$filename=$filename . ".txt";


Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

601 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