Hi Chas, Thanks for mail.
I am writting this script in clearquest application and i really don't know what is the meaning of $entity. In clearquest language "An Entity object representing a user data record" and secound thing i am running this perl script on windows. so i really don't know what all modules needs to be added to run this script. plz help me. Regards Irfan Sayed "Chas Owens" <[EMAIL PROTECTED]> 03/23/2006 10:53 PM To Irfan J Sayed/India/[EMAIL PROTECTED] cc beginners@perl.org Subject Re: perl code help On 3/23/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: > > > Hi Chas, > > This is the only program i am using. > > Plz tell me what i am doing wrong. > snip > > > Following is the script > > > > $sessionobj = $entity->GetSession(); > > $username = $session->GetUserLoginName(); > > $entity->SetFieldValue("submitter_id", $username); snip If this is in fact the only code in your scriptname.pl file then you have a host of problems. All Perl scripts should start with "#!/path/to/perl" usually "#!/usr/bin/perl". The next few lines are used to import modules (chunks of code, like libraries in C). This is done with the use statement. It is good practice to import the "strict" module as it forces you to write better code. So, at the very least you should have code that looks like #!/usr/bin/perl use strict; use SomeModuleThatCreatesEntity; my $entity = SomeModuleThatCreatesEntity->new; my $sessionobj = $entity->GetSession(); my $username = $session->GetUserLoginName(); $entity->SetFieldValue("submitter_id", $username); print "user is $username\n"; #debug code; I have no idea what SomeModuleThatCreatesEntity will be for you as you have not provided any information on it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>