?
Solved

Very EASY question

Posted on 2000-03-21
3
Medium Priority
?
153 Views
Last Modified: 2013-12-25
I want to test a variable if it has got characters in it. Somehow this doesn't work. Can someone provide me with the correct code ?

if $form{$key}='' {
 print "allright";

  }
0
Comment
Question by:oostwijk
  • 2
3 Comments
 

Author Comment

by:oostwijk
ID: 2642244
I ment to say:

if $form{$key}="" {
 print "allright";
  }
0
 
LVL 16

Accepted Solution

by:
maneshr earned 100 total points
ID: 2642273
try this....

if ($form{$key}){ ## Key DOES have a value in it!!
  print "All right\n";
}else{
   print "Empty :-( \n";
}
0
 

Author Comment

by:oostwijk
ID: 2651343
Ok, that works fine...
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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 provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
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 modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

840 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