Question : Construct and Launch URL

Hi,

I've a list of ticket numbers for an online demand tracking system called JIRA. All the tickets in the system can be accessed at : https://xxxx.xx.xxxxxx.xxx/jira/browse/<ticket-id>

I some how want to launch a browser on my pc which will have a list of URLs the user can click to view each ticket. So if the file had

tix1
tix2
tix3

then the web page would display hyper links

https://xxxx.xx.xxxxxx.xxx/jira/browse/tix1
https://xxxx.xx.xxxxxx.xxx/jira/browse/tix2
https://xxxx.xx.xxxxxx.xxx/jira/browse/tix3

Any ideas? Is this possible, or can you think of a neater or more feasible solution?

Thanks

Answer : Construct and Launch URL

Here's an updated version with a few typos fixed:

/bin/perl -wc ttt.p
ttt.p syntax OK
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
#!/usr/local/bin/perl

use strict;
use warnings;
use sendmail;
use POSIX;

my $html;
my $cnt = 0;
my $dte = strftime "%A, %B %d, %Y - %T", localtime;

open IN, "tix_file" or die "could not open tix_file: $!";


$html .= "<html>\n<body>\n";
$html .= "<h1>Ticket Report</h1>\n";

while (<IN>) 
{
    chomp;
    $cnt++;
    my $url = "https://ibjira.uk.mmm.com/jira/browse/$_";
    $html .= "<a href=\"$url\">Ticket $_</a><br />\n";
}

$html .= "<hr />\n";
$html .= "found $cnt records<br />\n";
$html .= "</body>\n</html>\n";

close IN;

# configure email options
my $sendto = '[email protected], [email protected]';
my $from = "Automated Email";
my $subject = "Ticket Report for $dte";


sendmail($sendto, $from, $subject, $html);
exit;
Random Solutions  
 
programming4us programming4us