[ic] Delete a bunch of scratch variables

Rick Bragg lists at gmnet.net
Sun Jun 19 17:55:09 UTC 2011


Hi,

I have a pretty simple perl problem with deleting a set of scratch
variables.

During a session, I am setting variables such as the following as the
user browses around

[tmp item_sku]ItemA[/tmp]
[calc]$Scratch->{product_[scratch item_sku]_position} = '100'; return; [/calc]
[tmp item_sku]ItemD[/tmp]
[calc]$Scratch->{product_[scratch item_sku]_position} = '150'; return; [/calc]
[tmp item_sku]ItemF[/tmp]
[calc]$Scratch->{product_[scratch item_sku]_position} = '182'; return; [/calc]

I need a way to simple delete all the "product_[scratch
item_sku]_position" variables at once, but I don't know what the
[scratch item_sku]'s are or how many of there there might be.Basically
something like a wild card such as:

[calc]$Scratch->{product_*_position} = ''; return; [/calc]

I think there is simple way to delete these.  Can anyone give me a
simple solution to this?  

Thanks!
Rick











More information about the interchange-users mailing list