Perl/TK "GetOpenFile"

Perl/TK "GetOpenFile"

am 28.01.2007 04:31:04 von Ricardo Ferreira

--===============1509932956==
Content-Type: multipart/alternative;
boundary="----=_Part_31466_17944645.1169955064828"

------=_Part_31466_17944645.1169955064828
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi

I am using perl/tk and getopenFile to get the full path of multiples files
then i am use "-multiple => 10".
ok I would like to get the full path of this
files, end put this in one variable.

but when a do:


sub Filess {
$mainfile = $mw->getOpenFile(-multiple => 100);

print $mainfile;
}

when I choose the file the program print it : "ARRAY(0x1e66134)"
i do not want it, I want : "e:\file1" e:\file2", or "\root\file1"
"\root\file2".

is possible to get the full path of multiple or one file with GetOpenFile ?

thanks

--
Ricardo

------=_Part_31466_17944645.1169955064828
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi

I am using perl/tk and getopenFile to get the full path of multiples files
then i am use "-multiple => 10".
ok I would like to get the full path of this files, end put this in one variable.


but when a do:


sub Filess {
$mainfile = $mw->getOpenFile(-multiple => 100);

print $mainfile;
}

when I choose the file the program print it : "ARRAY(0x1e66134)"

i do not want it, I want : "e:\file1" e:\file2", or "\root\file1" "\root\file2".

is possible to get the full path of multiple or one file with GetOpenFile ?

thanks


--
Ricardo

------=_Part_31466_17944645.1169955064828--

--===============1509932956==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1509932956==--

Re: Perl/TK "GetOpenFile"

am 28.01.2007 06:31:10 von Bill Luebkert

Ricardo Ferreira wrote:
> Hi
>
> I am using perl/tk and getopenFile to get the full path of multiples files
> then i am use "-multiple => 10".
> ok I would like to get the full path of this
> files, end put this in one variable.
>
> but when a do:
>
>
> sub Filess {
> $mainfile = $mw->getOpenFile(-multiple => 100);
>
> print $mainfile;
> }
>
> when I choose the file the program print it : "ARRAY(0x1e66134)"
> i do not want it, I want : "e:\file1" e:\file2", or "\root\file1"
> "\root\file2".
>
> is possible to get the full path of multiple or one file with GetOpenFile ?

It appears that $mainfile is an array ref, try:

my $mainfile = $mw->getOpenFile(-multiple => 100);
print "@$mainfile\n";
or
my @mainfile = $mw->getOpenFile(-multiple => 100);
print "$_\n" foreach @mainfile; # or print "@mainfile\n";
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Perl/TK "GetOpenFile"

am 28.01.2007 17:59:11 von Ricardo Ferreira

--===============2083667001==
Content-Type: multipart/alternative;
boundary="----=_Part_34141_26207279.1170003551954"

------=_Part_34141_26207279.1170003551954
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Thanks it is working now!

now i am thinking how to gets this file in "" but i beleve i can do that

thanks again

2007/1/28, Bill Luebkert :
>
> Ricardo Ferreira wrote:
> > Hi
> >
> > I am using perl/tk and getopenFile to get the full path of multiples
> files
> > then i am use "-multiple => 10".
> > ok I would like to get the full path of this
> > files, end put this in one variable.
> >
> > but when a do:
> >
> >
> > sub Filess {
> > $mainfile = $mw->getOpenFile(-multiple => 100);
> >
> > print $mainfile;
> > }
> >
> > when I choose the file the program print it : "ARRAY(0x1e66134)"
> > i do not want it, I want : "e:\file1" e:\file2", or "\root\file1"
> > "\root\file2".
> >
> > is possible to get the full path of multiple or one file with
> GetOpenFile ?
>
> It appears that $mainfile is an array ref, try:
>
> my $mainfile = $mw->getOpenFile(-multiple => 100);
> print "@$mainfile\n";
> or
> my @mainfile = $mw->getOpenFile(-multiple => 100);
> print "$_\n" foreach @mainfile; # or print "@mainfile\n";
>



--
Ricardo Ferreira Teixeira

------=_Part_34141_26207279.1170003551954
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Thanks it is working now!

now i am thinking how to gets this file in "" but i beleve i can do that

thanks again

2007/1/28, Bill Luebkert <
dbecoll@roadrunner.com
>:

Ricardo Ferreira wrote:
> Hi
>
> I am using perl/tk and getopenFile to get the full path of multiples files
> then i am use "-multiple => 10".
> ok I would like to get the full path of this

> files, end put this in one variable.
>
> but when a do:
>
>
> sub Filess {
> $mainfile = $mw->getOpenFile(-multiple => 100);
>
> print $mainfile;
> }

>
> when I choose the file the program print it : "ARRAY(0x1e66134)"
> i do not want it, I want : "e:\file1" e:\file2", or "\root\file1"
> "\root\file2".

>
> is possible to get the full path of multiple or one file with GetOpenFile ?

It appears that $mainfile is an array ref, try:

        my $mainfile = $mw->getOpenFile(-multiple => 100);
        print "@$mainfile\n";

or
        my @mainfile = $mw->getOpenFile(-multiple => 100);
        print "$_\n" foreach @mainfile; # or print "@mainfile\n";



--
Ricardo Ferreira Teixeira

------=_Part_34141_26207279.1170003551954--

--===============2083667001==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============2083667001==--

Re: Perl/TK "GetOpenFile"

am 28.01.2007 21:20:08 von Bill Luebkert

Ricardo Ferreira wrote:
> Thanks it is working now!
>
> now i am thinking how to gets this file in "" but i beleve i can do that

Just escape them or use another quoting character:

print "\"$_\"\n" foreach @mainfile;
or
print qq{"$_"\n} foreach @mainfile;

> It appears that $mainfile is an array ref, try:
>
> my $mainfile = $mw->getOpenFile(-multiple => 100);
> print "@$mainfile\n";
> or
> my @mainfile = $mw->getOpenFile(-multiple => 100);
> print "$_\n" foreach @mainfile; # or print "@mainfile\n";
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs