use CGI qw(:standard);
my $cfg = param('CFG');
my $fname = param('fname');
--
Mark Thomas [EMAIL PROTECTED]
Sr. Internet Architect User Technology Associates, Inc.
$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 20, 2001 9:58 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: Decoding a URL in Perl
>
>
> Hi Philip,
>
> Below is the java program I am sending
>
> import java.net.*;
> import java.net.URL;
> import java.util.*;
> import java.io.*;
>
> public class myURL {
> public static void main(String argv[]){
>
> URL pvcs1,pvcs2;
> try {
>
> String cfg= argv[0];
> String ci = argv[1];
> String cfgEncode = URLEncoder.encode(cfg);
> String ciEncode = URLEncoder.encode(ci);
> String url = "http://169.77.2.67:8080/cgi-bin/vl.cgi?CFG="
> +cfgEncode + "&fname=" + ciEncode;
> System.out.println(url);
> pvcs1=new URL(url);
>
> InputStream x = pvcs1.openStream();
> InputStreamReader y = new InputStreamReader(x);
> BufferedReader z = new BufferedReader(y);
> String data;
> while ((data = z.readLine()) != null) {
> System.out.println(data);
> }
> }
> catch(Exception e){
> System.out.println("Unable to open the NAMED URL FROM
> COSL-UX6....");
> e.printStackTrace();
> }
>
> }
> }
>
>
>
> After compilation , I am passing 2 arguments to this java program as
> some configuration files as
>
> java myURL /fmg/webdev/john/prime.cfg abc
>
>
> This then goes to my perl script in the format
> http://169.77.2.67:8080/cgi-bin/vl.cgi?CFG=%2Ffmg%2Fwebdev%2Fj
> ohn%2Fprim
> e.cfg&fname=abc
>
>
> I want to decode this value in perl so that i can get the two
> arguments
> passed from the URL string as
>
> variable a = /fmg/webdev/john/prime.cfg
>
> variable b = abc
>
>
> I have tried to put the problem in the best way . I hope this
> helps u in
> understaing my query.
>
> Thanks in advance,
>
>
>
>
> -----Original Message-----
> From: Philip.Newton [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 20, 2001 7:17 PM
> To: Ghodke, Mihir; perl-win32-admin
> Cc: Philip.Newton
> Subject: Re: Decoding a URL in Perl
>
>
> [EMAIL PROTECTED] wrote:
> > I am sending a string as a java encoded URL to a perl script.
> > I have to decode the string in the perl script. Is there any way
> > i can decode the string.
>
> Can you give us more details on how you are "sending" the URL to the
> script
> (magic? telepathy?) and an example of what a "java encoded URL" looks
> like?
> Perhaps we can then be of more help.
>
> I'm *guessing* that you're submitting data to a CGI script,
> but it would
> be
> best if you tell us. Perhaps what you mean is that you're passing a
> command
> line parameter instead.
>
> Oh, and please don't post RTF attachments; plain text is just fine.
>
> Cheers,
> Philip
> --
> Philip Newton <[EMAIL PROTECTED]>
> All opinions are my own, not my employer's.
> If you're not part of the solution, you're part of the precipitate.
> _______________________________________________
> Perl-Win32-Admin mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
>
>
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin