<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>I have this perl script that I found on the list but I have an error when I run it: (my apologies if this a perl error, should find a perl list and post it there)<BR>
<BR>
#!/usr/bin/perl<BR>
<BR>
use lib "/var/lib/rt3";<BR>use lib "/etc/rt3";<BR>
<BR>
package RT;<BR>
<BR>
use strict;<BR>use warnings;<BR>use RT;<BR>use RT::Ticket;<BR>use RT::Tickets;<BR>use RT::CurrentUser;<BR>use RT::Queue;<BR>use RT::Transactions;<BR>use RT::Users;<BR>use RT::Groups;<BR>use RT::Principal;<BR>use DBI;<BR>use RT::Interface::CLI qw (CleanEnv GetCurrentUser);<BR>
<BR>
<BR># Load the RT configuration<BR>RT::LoadConfig();<BR># Initialiaze RT<BR>RT::Init();<BR>
<BR>
#-------------------------------Gets current user name:<BR>my $user = RT::User->new($RT::SystemUser);<BR>print $user;<BR>
<BR>
#-------------------------------Gets queue names<BR>my $queue_id = 10;<BR>my $queue_obj = RT::Queue->new( $session{'CurrentUser'} );<BR>$queue_obj->Load( $queue_id );<BR>my $queue_name = $queue_obj->Name;<BR>print $queue_name;<BR><BR>
----------------------------Output----------------------------<BR>
[root@test Desktop]# ./CF.pm<BR>Global symbol "%session" requires explicit package name at ./CF.pm line 40.<BR>Execution of ./CF.pm aborted due to compilation errors.<BR>[root@test Desktop]#<BR>
<BR>
<BR>
<BR>
<BR>
I have no clue as to what explicit package is missing: <BR>
<BR>
Any ideas will be greatly appreciated...<BR>
<BR>
Carlos<BR>
<BR><br /><hr />Play free games, earn tickets, get cool prizes! Join Live Search Club. <a href='http://club.live.com/home.aspx?icid=CLUB_wlmailtextlink' target='_new'>Join Live Search Club!</a></body>
</html>