Solved

Very EASY question

Posted on 2000-03-21
3
142 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 25 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

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
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 …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

717 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