and I now want to integrate to my perl scriptecho "1 BTC = $(curl -s https://api.coindesk.com/v1/bpi/currentprice/u +sd.json | grep -o 'rate":"[^"]*' | cut -d\" -f3) USD" 1 BTC
this code print to my browser#!/usr/bin/perl -w use strict; use warnings; use CGI; my $query = CGI->new ; loadPage (); sub loadPage { my $page = ""; $page = $query->param("page"); if ($page eq 'search') { print "Content-Type: text/html\n\n"; print "1 BTC = $(curl -s https://api.coindesk.com/v1/bpi/curre +ntprice/usd.json | grep -o 'rate\":\"[^\"]*' | cut -d\" -f3) USD"; }else { print "Content-Type: text/html\n\n"; print "error"; } }
how guys to integrate properly the command line into a print command instead Thx in advance1 BTC = 33 33curl -s https://api.coindesk.com/v1/bpi/currentprice/usd. +json | grep -o 'rate":"[^"]*' | cut -d" -f3) USD
2019-01-08 Athanasius fixed one code tag
In reply to bitcoin price from command line by *alexandre*
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |