[p4] perl question

Qazwart qazwart at gmail.com
Sat Aug 11 19:48:00 PDT 2007

Try using a backslash:

@files_list = $p4->Run("files", "\@labelname");

Or, you can use single quotes:

@files_list = $p4->Run("files", '@labelname');

Or, you could try using the concatenate operator:

@files_list = $p4->Run("files", '@' . "labelname");

The last form is nice because you could use a variable for the label  

@files_list = $p4->Run("files", '@' . "$labelname");

BTW, The p4.pm Perl module contains POD documentation. You can use  
the various pod2xxx commands (that come with Perl) to translate this  
documentation into the desired format:

$ pod2man p4.pm | nroff -man | more   #Man Page format
$ pod2text p4.pm | more    #Text Version
$ pod2html p4.pm > p4.html

On Aug 11, 2007, at 8:08 PM, Kilaru Sambaiah wrote:
> Hi All,
>   I am newbie to p4 and I have a question on p4 perl.
>   I wanted to run
> p4 label @labelname in perl
> I can run as
> @files_list = $p4->Run("files",  "@labelname");
> but perl try to interpolate @ to array. How I can avoid this. I  
> also have
> another
> question as my labelname is
> $label = "label_name"
> I would like to get files which are tagged as $label.
> thanks and regards,
> Sam
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user

David Weintraub
david at weintraub.name
qazwart at gmail.com

More information about the perforce-user mailing list