I've been asked to update old VBScripts to Perl scripts with some additional features added. Unfortunately I am stuck on getting the old code working in Perl. Here is the old VB code.

<font class="small">Code:</font><hr /><pre>
Dim test
Dim DSList
Dim ds

Set test = CurrentTest.Test

Set DesStepF = test.DesignStepFactory
Set DSList = DesStepF.NewList("")
For Each ds in DSList
TDOutput.Print ds.StepName + ": " + ds.StepDescription
TDOutput.Print "Expected result: " + ds.StepExpectedResult
</pre><hr />

Here is what I am trying in Perl.

<font class="small">Code:</font><hr /><pre>
my $test = $CurrentTest-&gt;Test;
</pre><hr />

Here is the error I am getting.

"[Error] (L1: c0): Can't call method Test on an undefined value at (eval 2) line 28."

$CurrentTest is defined as an input parameter. What am I missing here?